[Mysql-cocoa-users] Problems with null fields in version 2
Brought to you by:
sergecohen
From: Jerome R. <jer...@fn...> - 2002-07-17 10:33:59
|
Hello, I've just checked out the version-2, and all I've done with version 0.7=20= works correctly with this version. After this, I tried to test if NULL field problem was corrected, but I=20= still have a problem (maybe I don't use it as it should). The null field I try to read are dates. Here is a part of my source code: MCPConnection *connection; NSString *query; MCPResult *result; NSDictionary *row; connection =3D [[MCPConnection alloc] initToHost:server=20 withLogin:login password:password usingPort:0]; [connection selectDB:db ]; NSLog(@"step 1"); query =3D [[NSString alloc] initWithFormat: @"SELECT EVENT.ID, = TYPE,=20 DESCRIPTOR, TOWN, AREACODE, DAY FROM EVENT, TOWN"]; NSLog(@"step 2"); result =3D [connection queryString: query ]; NSLog(@"step 3"); while (row =3D [result fetchRowAsDictionary]) { NSLog(@"step 4"); .......... } NSLog(@"step 5"); The result is that step 1, 2 and 3 are displayed in the console, and=20 then I obtain ; *** -[NSCFDictionary setObject:forKey:]: attempt to=20 insert nil value One field in the result is null, but I can't get any field, so I can't=20= use MCPNull. Am I using it correctly? Thanks. J=E9r=F4me Rabas. |