SQLite3 ODBC 驱动程序出现 VB6 错误
我正在使用 SQLite ODBC 驱动程序(从这里 http://www.ch-werner.de/sqliteodbc /)与我的 VB6 应用程序。 就检索和保存数据而言,一切工作正常,但是,如果我尝试通过以下命令获取表列的列表:
pragma table_info (myTableName)
ADO 调用失败并出现 2 个错误(在 Connection.Errors 属性中找到)
错误 #1:描述: “多步 OLE DB 操作生成错误。检查每个 OLE DB 状态值(如果可用)。未完成任何工作。” : String : cMisDataLayer.ExecuteRecordset
错误#2: 描述:“提供程序不支持该属性。” : String : cMisDataLayer.ExecuteRecordset
我的问题是为什么我会收到此错误,是否有解决方法来获取 SQLite 中表的列列表?
谢谢。
I am using an SQLite ODBC Driver (from here http://www.ch-werner.de/sqliteodbc/) with my VB6 application. Everything works fine, as far as retrieving and saving data, however, if I try to get the list of table columns via the following command:
pragma table_info (myTableName)
The ADO call fails with 2 errors (found in Connection.Errors property)
Error #1: Description : "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." : String : cMisDataLayer.ExecuteRecordset
Error #2: Description : "Provider does not support the property." : String : cMisDataLayer.ExecuteRecordset
My question is why am I getting this error and is there a workaround to getting the column list for a table in SQLite?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
为什么不直接使用 ADO RecordSet Fields 集合? 只需执行 SELECT * FROM table WHERE 1=0 即可。 当 ADO 获取结果集时,它也会返回所有列信息。
Why not just use the ADO RecordSet Fields collection? Just do a SELECT * FROM table WHERE 1=0. When ADO gets a resultset it returns all the column information as well.
虽然我没有使用过 SQLite ODBC,但我想你可以做一个 ADOX 库 - 我想它是用来从数据库获取架构信息的。
此页面可能会有所帮助。
While I have not worked with SQLite ODBC, I guess you can do a ADOX library - which I guess is used to get the schema information from the database.
This page might help.
检查您使用的是 Win32 还是 Win64 版本的 SQLite ODBC 驱动程序可能会有所帮助。
Checking whether you are using Win32 or Win64 version of SQLite ODBC Driver might help.