Iphone SQLite插入问题

Iphone SQLite插入问题,iphone,sqlite,Iphone,Sqlite,我的应用程序有SQLite数据库。我能够从SQLite表中检索值并插入值,没有SQL错误,但无法在SQLite表中找到。我只是在这一点上卡住了。这是我的密码: NSMutableString *registrationquery=[NSMutableString stringWithFormat:@"insert into tbl_kicks values ('%@','%@','%@')",[totalkicks text],[sessionstart text],[sessionstart

我的应用程序有SQLite数据库。我能够从SQLite表中检索值并插入值,没有SQL错误,但无法在SQLite表中找到。我只是在这一点上卡住了。这是我的密码:

NSMutableString *registrationquery=[NSMutableString stringWithFormat:@"insert into tbl_kicks values ('%@','%@','%@')",[totalkicks text],[sessionstart text],[sessionstart text],@"0"];      

//NSString *sqlNSString = [NSString stringWithFormat:@"INSERT INTO 'tbl_kicks' VALUES('%d','%@','%@');",  

// 4,sessionstart.text, appDelegate.note];

const char *sqlString = [registrationquery UTF8String];
char *sqlError;
sqlite3_exec( appDelegate.database, sqlString, NULL, NULL, &sqlError );

首先,你没有一份准备声明。您应该尝试使用sqlite3_prepare_v2并读取它返回的错误代码(如果有),然后仅执行