0

I am using VBscript, ADO and the SQLite ODBC driver to store and retrieve large strings (~5KB). Storing them works fine, maybe because I am able to specify a size while I bind the parameters of the insert statement. When I try to retrieve those strings, however, I correctly get the first 256 (or 255) characters but the rest seams to come from a random memory area. What am I doing wrong (besides using VBscript and ADO...)?

I'm open to the idea of storing the text as binary data. But the functions I tried, to retrieve it later, didn't work.

7
  • ADO has a GetChunk method. support.microsoft.com/kb/180368
    – Tim
    Mar 6, 2013 at 11:23
  • I had tried it already but... "This method does not work on Field objects of a Record object." (w3schools.com/ado/met_field_getchunk.asp)
    – Syranolic
    Mar 6, 2013 at 12:20
  • See if anything here helps you out: motobit.com/tips/detpg_binarytostring
    – Tim
    Mar 6, 2013 at 12:25
  • I was also looking at that. But since storing or binary/string is not the issue, maybe my real question is "how to steer the structure and types in a recordset after executing a SELECT"
    – Syranolic
    Mar 6, 2013 at 12:49
  • I might give up: "With the ODBC cursor library, it is not possible to use the GetChunk or AppendChunk methods on a recordset returned from a stored procedure. This is because the BLOB data is not normally retrieved with the rest of the data in order to save bandwidth. When a stored procedure creates a recordset, the cursor driver cannot determine how to query for the BLOB data after the fact because it cannot determine the base tables or key fields to use. Server-side cursors alleviate this problem but limit you to a single statement per stored proc..." (support.microsoft.com/kb/194975)
    – Syranolic
    Mar 6, 2013 at 13:07

1 Answer 1

0

getChunk will not work on a record field as noted on msdn, also the field attribute adFldLong states if getChunk can be used on that field. In some fields you must use the SQL query to retrieve the length of data instead of using attribute actualSize

there is a good example e here http://kek.ksu.ru/eos/ecommerce/masteringasp/18-06.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.