storing and retrieving large strings in SQLite with ADO and VBScript(使用 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 中存储和检索大字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 ADO 和 VBScript 在 SQLite 中存储和检索大字符串
基础教程推荐
- 从字符串 TSQL 中获取数字 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- 带更新的 sqlite CTE 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
