0

I am trying to complete an iPhone app. And for this i need to fetch a database from MySQL to SQLite. For this case i did use some code like 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];

But this code does not work properly. Here also mention that i have used some framework like cocoa.framework, cocos2d, openGLES.framework, openAL.framework, APPKit.framework, MCPKit.framework, Quartzcore.framewrok . and finally i get an error msg that CIColer.h is missing.

freinds, if u know the solution or if u have another code then pls help me

1
  • Coud you put code tag around code. It looks encrypted now. Commented Jan 28, 2009 at 11:12

1 Answer 1

2

Are you asking how to poll a remote database, or how to pre-export?

Polling a remote database and importing data should be as simple as opening the socket to the remote db, executing the query, and closing again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.