List:MySQL ODBC« Previous MessageNext Message »
From:Federico Balbi Date:July 14 1999 1:10am
Subject:SQLGetData
View as plain text  
Hello,

  I am using VC++ and MyODBC to retrieve long strings from MySQL.

I defined SQL_ATTR_MAX_LENGTH as 16384 (16K) in order to read chunks of 16K.
Everything works fine for fields less than 16K.

When I get a field of 78K for example my loop stops after the 2nd chunk.
The first of 16K and the second of 1 byte so data is truncated.

Here a log:

col 3 <SQL_SUCCESS_WITH_INFO>
chunk 1 size 16384
col 3 <SQL_SUCCESS>
chunk 2 size 1
LEN = 16385
[1][long article][16385]
done!

The real size of the article are 78Kb and so I should read 5 chunks.
At thesecond chink SQLGetData reads only 1 byte and returns SQL_SUCCESS 
ending the loop...

Thanks,
Federico
Thread
SQLGetDataFederico Balbi14 Jul
  • SQLGetDataMichael Widenius30 Jul