Sto cercando di completare un'applicazione per iPhone. E per questo ho bisogno di recuperare un database da MySQL a SQLite. Per questo caso ho usato un po 'di codice come bellow-
MCPConnection *theConnec;
MCPResult *theRes;
//initialize connection string vars
NSString *dbURL = @XXXXXX;
NSString *userName = @XXXXXX;
NSString *pass = @XXXXXX;
//open connection to database
theConnec = [theConnec initToHost:dbURL withLogin:userName password:pass usingPort:3306];
//NSLog(@The connection to database was successfull);
[theConnec selectDB:@XXXXXX];
//{
// NSLog(@Database found);
//}
//else
//{
// NSLog(@Database not found);
//}
theRes = [theConnec queryString:@select * from seahawk_tag];
//get the number of rows
NSInteger numberOfRows = [theRes numofRows];
NSLog(@Query of MySQL Database %@, numberOfRows);
return NSApplicationMain(argc, (const char **) argv);
[theConnec release];
Ma questo codice non funziona correttamente. Qui ricordare anche che ho usato un quadro di riferimento come cocoa.framework, cocos2d, openGLES.framework, openAL.framework, APPKit.framework, MCPKit.framework, Quartzcore.framewrok. e, infine, ottengo un msg di errore che CIColer.h manca.
freinds, se u sa la soluzione o se u avere un altro codice, allora pls aiutami













