Solved

MFC CLongBinary

Posted on 1998-12-17
1
361 Views
Last Modified: 2013-11-20
I'm using CRecordset and CLongBinary to insert image into SQLServer6.5 database.  I did call SetFieldDirty() after I called AddNew(), then I read image out of a image file into the buffer I allocated.  The data pointer in the CLongBinary object points to the data buffer.  But after update() call, the image field still seems to be null.  No exception was thrown.  Everything seems to be ok except when I look at the table, the field is null.  Why?
0
Comment
Question by:accord
1 Comment
 
LVL 4

Accepted Solution

by:
piano_boxer earned 100 total points
ID: 1326372
Try also calling SetFieldNull(&m_nMyClassMember, FALSE) after the SetFieldDirty(&m_nMyClassMember, TRUE) call.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question