Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Draw This
($0.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-22-2009, 08:13 PM   #1 (permalink)
cation007
Registered Member
 
Join Date: Jul 2009
Posts: 20
cation007 is on a distinguished road
Unhappy Annoyance with SQLite3

Hi,
I have a strange problem with sqlite3.

Code:
NSString *queryStatementNS = "drop table \"myTABLE\"";
const char *queryStatement = [queryStatementNS UTF8String];
if(sqlite3_prepare_v2 (db, queryStatement, -1, &dbps, NULL) == SQLITE_OK)
{
if(sqlite3_step (dbps) == SQLITE_OK)
{
}
else
{
NSLog(@"SQL step failed code: %d", sqlite3_step (dbps));
NSLog(@"Attempted Query: %@", queryStatementNS);
}

sqlite3_finalize (dbps);
sqlite3_close(db);
}

Output:
SQL step failed code: 21
Attempted Query: drop table "myTABLE"

I often get this error. Is the syntax wrong ? I checked online which says error 21 means SQLITE_MISUSE.

I thought this error would come up only when we have special characters in the query.

What am I doing wrong ?

Plz help.

Thanks.

Last edited by cation007; 07-22-2009 at 08:16 PM. Reason: missing information
cation007 is offline   Reply With Quote
 

» Advertisements
» Online Users: 577
13 members and 564 guests
chiataytuday, christina2c, Domele, Droverson, Dump3, Fstuff, iamwayne5, jerrasen, kanishadg35, linkmx, Techgirl-52, ThistleCoast, timchen
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 174,552
Threads: 93,728
Posts: 401,267
Top Poster: BrianSlick (7,954)
Welcome to our newest member, christina2c
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:11 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.