我的这个库sqlite有问题:https://github.com/ryanfowler/SwiftData
我已使用此代码插入表值:
let name: String = "test" //user input
let population: String = "test"//user input
if let err = SD.executeChange("INSERT INTO Users (Name, Surname) VALUES (?, ?)", withArgs: [name, population]) {
//there was an error during the insert, handle it here
} else {
//no error, the row was inserted successfully
}
但是我收到了这个错误:
准备期间出错 - > SQLITE代码:1 - SQL错误或缺少数据库