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

2023-04-04数据库问题
1

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

The End

相关推荐

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

如何在MySQL中为每个组选择第一行?
How to select the first row for each group in MySQL?(如何在MySQL中为每个组选择第一行?)...
2024-04-16 数据库问题
13

MySQL - 获取最低值
MySQL - Fetching lowest value(MySQL - 获取最低值)...
2024-04-16 数据库问题
8

在 cmakelist.txt 中添加和链接 mysql 库
Add and link mysql libraries in a cmakelist.txt(在 cmakelist.txt 中添加和链接 mysql 库)...
2024-04-16 数据库问题
41

考勤数据库的良好数据库设计(架构)是什么?
What is a good database design (schema) for a attendance database?(考勤数据库的良好数据库设计(架构)是什么?)...
2024-04-16 数据库问题
7

子类型的表关系
Table relationship for subtypes(子类型的表关系)...
2024-04-16 数据库问题
10