使用 ADO 和 VBScript 在 SQLite 中存储和检索大字符串 [英] storing and retrieving large strings in SQLite with ADO and VBScript

查看:31
本文介绍了使用 ADO 和 VBScript 在 SQLite 中存储和检索大字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 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 中存储和检索大字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆