Solving the ODBC "Data truncated" error
Posted
by Jason Kat
on March 1st, 1999
To solve the problem, specify the length required as the fourth parameter of the RFX_Text() function in the AFX_FIELD_MAP section of your CRecordset derived class method file. The maximum length you can set it to is INT_MAX (2147483647) which is the maximum length of a CString object.
The source below shows the COST_INFO and BENEFITS columns of the table accessed being assigned a maximum length of 1000 characters each.
//{{AFX_FIELD_MAP(CProjectsSet)
RFX_Text(pFX, _T("[COST_INFO]"), m_COST_INFO, 1000);
RFX_Text(pFX, _T("[BENEFITS]"), m_BENEFITS, 1000);
//}}AFX_FIELD_MAP

Comments
Is this true for SQL server 6.5
Posted by Legacy on 03/10/1999 12:00amOriginally posted by: Tommy Quitt
As much as I know, Ms SQL server 6.5 does not support longer strings that 255 chars.
Is this true or does this RFX_TEXT change will allow longer strings on SQL server 6.5 too?
Tommy
ReplyProblems with changing RFX_Text...
Posted by Legacy on 01/07/1999 12:00amOriginally posted by: Alexander Keck
Reply