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 中存储和检索大字符串


基础教程推荐
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- SQL Server 中单行 MERGE/upsert 的语法 2021-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01