gpt4 book ai didi

iOS 8 - 带有未知错误的 sqlite。

转载 作者:行者123 更新时间:2023-11-28 18:31:08 26 4
gpt4 key购买 nike

这是我第一次在我的应用程序中使用 Sqlite。所以我关注this tutorial .我对数据库进行了一些编辑以适合我的目的:

CREATE TABLE appointmentInfo(clientInfoID integer primary key, customername text, personname text, position text,appointmenttime text)

然后我用这段代码查询:

NSString *query = [NSString stringWithFormat:@"insert into appointmentInfo values(null, '%@', '%@', '%@', '%@')", self.customernameTF.text, self.personnameTF.text, self.positionTF.text,self.meetingtimeTF.text];
[self.dbManager executeQuery:query];

我不断收到错误:

DB Error: unknown error

但是当我检查sql文件时,记录被捕获了。

似乎是什么问题?

最佳答案

我在教程下方的讨论中找到了解决方案:

I changed the variable "executeQueryResults" to an int instead of a BOOL. That seems to have solved the problem.

我这样做并收到一条成功消息。

关于iOS 8 - 带有未知错误的 sqlite。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29843024/

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