Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: VC++ 4.2, ODBC 2.0, CString gets truncated
Mike McGaff <McGaff_at_fwva.saic.com> wrote:
>I'm querying using Oracle's ODBC 2.0 and one column is VARCHAR2(500).
>My
>VC++ 4.2 recordset variable is defined as a CString. When the text goes
>over 255 char's, I get back return code #1021 - Data truncated, and the
>recordset has no
>information at all (i.e. the query errors out). 0-255 char's works fine
>and
>all other columns for the row are returned.
>
>As a related issue that I haven't tested yet, there's another column
>defined
>as LONG, so that it can store "unlimited" text. I want to be able to
>query
>that from VC++ as well.
>
>Any clues on how to fix this?
I had this problem it has manifested itself in different ways with different ODBC drivers. With Visigenic driver it truncates with the Oracle driver it crashed (on the ODBC call). From this I imply it is to do with ODBC, but I found no mention in this limit anywhere.
I got around it by using two fields and concatenating them
I've you get to the bottom of this let me know.
Martin Bell Received on Thu Apr 10 1997 - 00:00:00 CDT
![]() |
![]() |