[Mysql-cocoa-users] <Kein Betreff>
Brought to you by:
sergecohen
From: Michael T. <mta...@ap...> - 2005-04-15 08:44:53
|
Hi all, I=B9ve got a problem with querying the database. Please look at the following code snippet to see what happens. ------------ Connection =3D [[MCPConnection alloc] initToHost:@"localhost" withLogin: @"test" password: @"test" usingPort: 0]; =20 if (! Connection || [Connection isConnected] =3D=3D FALSE) { NSLog (@"Could not log into database: %@\n", [Connection getLastErrorMessage]); NSBeep(); } else { NSArray *Dict =3D nil; MCPResult *Result =3D nil; =20 [Connection selectDB:@"faq"]; =20 if ([Connection getLastErrorID] =3D=3D 0) Result =3D [Connection queryString:@"select * from faqdata"]; =20 /******************** the next line causes a bus error ********************= / if (Result !=3D nil) NSLog (@"Got: %@\n", [Result description]); NSLog (@"Got: %@ - %i\n", [Connection getLastErrorMessage],[Connection getLastErrorID]); /* * read to start queries... */ } ----------------- I don=B9t know what the problem is, but as soon as I want to print out the description, the application crashes. By the way, the CLI_test application crashes too when I=B9m connecting to the database using the login above. Thank you in advance, Michael Taubert |