无法创建表;为什么这段代码会失败?

Unable to CREATE TABLE; why does this code fail?(无法创建表;为什么这段代码会失败?)
本文介绍了无法创建表;为什么这段代码会失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 SQLite v3.22.0 和 AutoIt v3.3.14.3 时遇到问题.尝试创建数据库有效,但未创建表.我使用 AutoIt 示例代码:

I have a problem with SQLite v3.22.0 and AutoIt v3.3.14.3. Trying to create a database works but the table does not get created. I use the AutoIt example code:

#include <MsgBoxConstants.au3>
#include <SQLite.au3>
#include <SQLite.dll.au3>

Local $hQuery, $aRow, $sMsg
_SQLite_Startup()
ConsoleWrite("_SQLite_LibVersion=" & _SQLite_LibVersion() & @CRLF)
_SQLite_Open() ; open :memory: Database
_SQLite_Exec(-1, "CREATE TABLE aTest (a,b,c);") ; CREATE a Table
_SQLite_Exec(-1, "INSERT INTO aTest(a,b,c) VALUES ('c','2','World');") ; INSERT Data
_SQLite_Exec(-1, "INSERT INTO aTest(a,b,c) VALUES ('b','3',' ');") ; INSERT Data
_SQLite_Exec(-1, "INSERT INTO aTest(a,b,c) VALUES ('a','1','Hello');") ; INSERT Data
_SQLite_Query(-1, "SELECT c FROM aTest ORDER BY a;", $hQuery) ; the query
While _SQLite_FetchData($hQuery, $aRow) = $SQLITE_OK
    $sMsg &= $aRow[0]
WEnd
_SQLite_Exec(-1, "DROP TABLE aTest;") ; Remove the table
MsgBox($MB_SYSTEMMODAL, "SQLite", "Get Data using a Query : " & $sMsg)
_SQLite_Close()
_SQLite_Shutdown()

; Output:
; Hello World

如果我请求 SQLite 错误,我会收到库使用不正确".这种情况有什么问题?

If I request the SQLite error, I get "Library used incorrectly". What's the problem in this case?

推荐答案

AutoIt v3.3.14.3 有一个错误;安装 AutoIt v3.3.14.2 或 获取错误修复.

AutoIt v3.3.14.3 has a bug; install AutoIt v3.3.14.2 or get the bug-fix.

这篇关于无法创建表;为什么这段代码会失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

FastAPI + Tortoise ORM + FastAPI Users (Python) - Relationship - Many To Many(FastAPI+Tortoise ORM+FastAPI用户(Python)-关系-多对多)
Window functions not working in pd.read_sql; Its shows error(窗口函数在pd.read_sql中不起作用;它显示错误)
(Closed) Leaflet.js: How I can Do Editing Geometry On Specific Object I Select Only?((已关闭)Leaflet.js:如何仅在我选择的特定对象上编辑几何图形?)
in sqlite update trigger with multiple if/Case Conditions(在具有多个IF/CASE条件的SQLite UPDATE触发器中)
Android: Why is Room so slow?(Android:为什么Room这么慢?)
Remote Procedure call failed with sql server 2008 R2(使用 sql server 2008 R2 的远程过程调用失败)