SetFieldNull??? 
Author Message
 SetFieldNull???

I have experienced this sort of thing and finally figured out the
following:

If double buffering is turned off, ie, bcachefield....... (forget the exact
spelling) then you have to assign the new value, call SefFieldDirty, then
call SetFieldNull(....., FALSE) for each field that will contain new data.
Anything else produces the symptom you describe.

Jack


Quote:
> Hello,

> I'am using VC++ 4.0 and ODBC.
> I wrote a routine which does something like DDX_FiledText. But it uses
> CRichEditCtrl instead of CEdit.

> It works fine when there is something in the database field. But if it
> is null before, the new contents are not saved.

> A portion of the code is below

> void CWiView::StreamRichEdit(CRichEditCtrl& pEdit, BOOL bSave,
>    CString& pqt) //pqt is the variable which holds the                         contents of the
> field  
> {
>    EDITSTREAM es;
>    es.dwCookie = (DWORD)(LPCTSTR) pqt ;

>         if (bSave)
>         {
>                es.pfnCallback = EditStreamOutCallback;
>               num = pEdit.StreamOut(SF_RTF, es);
>                // At this stage pqt holds the new value in the field
>                        // This setfieldnull does not seem to work.
>                m_pSet->SetFieldNull(&pqt,FALSE) ;  

>            }

>    ...

> Any ideas?

> Can Celik



Thu, 01 Jul 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Help: setFieldNull problem

2. Problems with CRecordset::SetFieldNull()

3. SetFieldNull()

4. Problem with CRecordSet::SetFieldNull on Date field

5. SetFieldNull in CRecordset (MSVC 4.2)

6. Problem with CRecordSet::SetFieldNull on Date field

7. Problem with SetFieldNull on date field

8. CRecordset::SetFieldNull etc.

9. SetFieldNull() in combination with ExecDirect

10. CRecordset::SetFieldNull bug?

11. Help: setFieldNull problem

12. Problems with CRecordset::SetFieldNull()

 

 
Powered by phpBB® Forum Software