Solved

MFC CLongBinary

Posted on 1998-12-17
1
364 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Expand macro to ask for filename column 8 37
Line meaning 9 87
firstChar challenge 13 121
Increment column based of a FK 8 31
Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

856 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