Recupero dati da MySQL a SQLite

voti
0

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

È pubblicato 28/01/2009 alle 11:02
fonte dall'utente
In altre lingue...                            


1 risposte

voti
1

Stai chiedendo come eseguire il polling un database remoto, o come pre-export?

Polling un database remoto e importare dati dovrebbero essere semplice come aprire la presa alla db remoto, l'esecuzione della richiesta e richiusura.

Risposto il 16/09/2009 a 05:18
fonte dall'utente

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more