問題描述
我正在使用 VBscript、ADO 和 SQLite ODBC 驅動程序來存儲和檢索大字符串 (~5KB).存儲它們工作正常,也許是因為我能夠在綁定 insert 語句的參數時指定大小.然而,當我嘗試檢索這些字符串時,我正確地獲得了前 256 個(或 255 個)字符,但其余接縫來自隨機內存區域.我做錯了什么(除了使用 VBscript 和 ADO...)?
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.
推薦答案
getChunk 不適用于 msdn 上指出的記錄字段,字段屬性 adFldLong 還說明是否可以在該字段上使用 getChunk.在某些字段中,您必須使用 SQL 查詢來檢索數據的長度,而不是使用屬性 actualSize
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
這里有一個很好的例子 http://kek.ksu.ru/eos/ecommerce/masteringasp/18-06.html
there is a good example e here http://kek.ksu.ru/eos/ecommerce/masteringasp/18-06.html
這篇關于使用 ADO 和 VBScript 在 SQLite 中存儲和檢索大字符串的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!