Update call to SQL Server with large record never returns 
Author Message
 Update call to SQL Server with large record never returns

I have an app which writes a blob of unspecified length to a SQLServer 7
database. I am using CRecordset as a base class, AddNew and Update.
Normally, this works fine, but on a couple of SQLServer installations, when
the data gets above 100K or so, the update never returns. I've waited hours.
The code is straightforward:

(messagebody is a CString containing the data, which on other systems works
with up to 10 Megs in it)

 mymessage.Open();
 mymessage.AddNew();
 mymessage.SetFieldDirty(&mymessage.m_body, TRUE);
 mymessage.SetFieldNull(&mymessage.m_body, FALSE);
 mymessage.m_body.m_dwDataLength = messagebody.GetLength();
 mymessage.m_body.m_hData = GlobalAlloc(GPTR,messagebody.GetLength());
 memcpy (mymessage.m_body.m_hData,
(LPCTSTR)messagebody,messagebody.GetLength());
 mymessage.Update();
 mymessage.Close();

Has anyone else seen situations where the Update would just not return?

Jeff



Mon, 19 Nov 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Error updating SQL-Server record via ODBC (CRecordset)

2. Connecting to a SQL server and updating a record using DB Lib

3. Updating records in a recordset defined by an SQL join

4. Basic Question on updating a record in a SQL DBase

5. ADO And Adding or Updating Records in SQL Table

6. Getting a random record from a SQL Server table

7. Locking a record in an MS-SQL Server

8. Failing to update records; CanUpdate() returns non-zero

9. Problem Fetching Records in Bulk using MFC/ODBC/SQL Server

10. Cannot delete SQL server duplicate records

11. How to process large text in SQL Server?

12. Adding records to SQL Server

 

 
Powered by phpBB® Forum Software