CLongBinary data truncation
- From: "AKS" <dagato2@xxxxxxxx>
- Date: 16 Oct 2006 02:41:59 -0700
Hi,
I am using ODBC with mfc. I have a field varbinary ( max ) in database,
i can load this field but when I try to create a new row with more than
8000 bytes it gives me "String data, right truncation" error. The MFC
documentation says that database field is too small, but it can be,
field is varbinary(max ).
Any idea?.
arrByet contains information.
binary->m_hData = GlobalAlloc ( GPTR, size );
binary->m_dwDataLength = GlobalSize ( binary->m_hData );
unsigned char* data = ( unsigned char* )GlobalLock ( binary->m_hData
);
memcpy_s ( data, size , arrByte, size );
GlobalUnlock ( binary->m_hData );
// Forzamos la actualizacion del campo.
SetFieldDirty ( binary, TRUE );
SetFieldNull( binary ,FALSE);
dofieldexchange:
RFX_LongBinary(pFX, _T("[time]"), m_time);
thanks
.
- Follow-Ups:
- Re: CLongBinary data truncation
- From: AKS
- Re: CLongBinary data truncation
- Prev by Date: Re: Argh!!! Class not registered
- Next by Date: Re: CLongBinary data truncation
- Previous by thread: Argh!!! Class not registered
- Next by thread: Re: CLongBinary data truncation
- Index(es):
Relevant Pages
|