使用 ADO 和 VBScript 在 SQLite 中存储和检索大字符串

storing and retrieving large strings in SQLite with ADO and VBScript(使用 ADO 和 VBScript 在 SQLite 中存储和检索大字符串)
本文介绍了使用 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 中存储和检索大字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

Group by month in SQLite(在 SQLite 中按月分组)
Why does my ODBC connection fail when running an SSIS load in Visual Studio but not when running the same package using Execute Package Utility(为什么我的 ODBC 连接在 Visual Studio 中运行 SSIS 加载时失败,但在使用执行包实用程序运行相同的包
Syntax for a parameter query in Python (pyodbc)(Python 中参数查询的语法 (pyodbc))
How do I create a CSV file from database in Python?(如何从 Python 中的数据库创建 CSV 文件?)
SQLite3 and multiple processes(SQLite3 和多个进程)
How to import CSV into sqlite using RSqlite?(如何使用 RSqlite 将 CSV 导入 sqlite?)