gpt4 book ai didi

sqlite - 数据库异常(Flutter 中的不完整输入(代码 1 SQLITE_ERROR)

转载 作者:行者123 更新时间:2023-12-04 00:53:38 24 4
gpt4 key购买 nike

当我使用flutter并创建表时,出现以下错误! :

error DatabaseException(incomplete input (code 1 SQLITE_ERROR): , while compiling: CREATE TABLE scheduled_shift_groups(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, uniqueGroupId TEXT, nightShiftCount INTEGER, dayShiftCount INTEGER, weekEnding INTEGER, estimatedIncome REAL) sql 'CREATE TABLE scheduled_shift_groups(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, uniqueGroupId TEXT, nightShiftCount INTEGER, dayShiftCount INTEGER, weekEnding INTEGER, estimatedIncome REAL' args []} during open, closing...
这是我的代码:
 Future<Database> database = getDatabasesPath().then((String path) {
return openDatabase(
join(path, dbName),
onCreate: (Database db, int version) async {
await db.execute(
"CREATE TABLE $scheduledShiftGroupsTableName(id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, uniqueGroupId TEXT, nightShiftCount INTEGER, dayShiftCount INTEGER, weekEnding INTEGER, estimatedIncome REAL");
},
version: 1,
);
});

最佳答案

事实上,我犯了一个愚蠢的错误!!!在我忘记的执行方法中 )签后 REAL .
现在问题解决了)。快乐编码!

关于sqlite - 数据库异常(Flutter 中的不完整输入(代码 1 SQLITE_ERROR),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64414634/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com