[Mysql-cocoa-users] Reading query result causes bus error
Brought to you by:
sergecohen
|
From: Michael T. <mta...@ap...> - 2005-04-19 07:33:03
|
Hi all,
I tried to run the following code to query a test database and as soon as I
want to print out the description the program crash with a bus error. The
CLI_test program is crashing too when I use these login informations and the
database.
------------------
Connection = [[MCPConnection alloc] initToHost:@"localhost"
withLogin: @"test"
password: @"test"
usingPort: 0];
if (! Connection || [Connection isConnected] == FALSE)
{
NSLog (@"Could not log into database: %@\n", [Connection
getLastErrorMessage]);
NSBeep();
}
else
{
NSArray *Dict = nil;
MCPResult *Result = nil;
[Connection selectDB:@"faq"];
if ([Connection getLastErrorID] == 0)
Result = [Connection queryString:@"select * from faqdata"];
if ([Connection getLastErrorID] == 0)
NSLog (@"Got: %@\n", [Result description]);
/*
* read to start queries...
*/
}
---------------
Any ideas?
Thank you,
Michael
|