Hello,
I am using PostgreSQL 8.2 and programming using VC++ MFC.
I have a field in a table of type text and it is for storing xml file.
I am using ODBC to access the PostgreSQL database.
I have no problem inserting the data in but when it comes to fetching, I will get an error: data truncated.
In VC++:
CString m_cleaned_xml;
m_cleaned_xml.GetBufferSetLength(256000);
m_cleaned_xml.ReleaseBufferSetLength(256000);
...
RFX_Text(pFX, _T("[cleaned_xml]"), m_cleaned_xml, 256000, SQL_LONGVARCHAR);
In ODBC data source:
checked "Text as LongVarChar"
set "Max LongVarChar" to 256000
Anyone know why it is not working?
Thanks in advance.
Hoi