List:MySQL ODBC« Previous MessageNext Message »
From:Michael Widenius Date:July 29 1999 8:10pm
View as plain text  
>>>>> "Federico" == Federico Balbi <fbalbi@stripped>
> writes:

Federico> Hello,
Federico>   I am using VC++ and MyODBC to retrieve long strings from MySQL.

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

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

Federico> Here a log:

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

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

Federico> Thanks,
Federico> Federico


Could you download the newest MyODBC driver and do a MyODBC trace file 
for this (check the MyODBC README file how to do this)?

The trace file should show you exactly what happens!

SQLGetDataFederico Balbi14 Jul
  • SQLGetDataMichael Widenius30 Jul