[Mysql-cocoa-users] testing for a NULL value from the db
Brought to you by:
sergecohen
From: John S. <joh...@hw...> - 2004-07-22 16:14:13
|
I have some rows in the database table that are nulls. I am trying to do an assignment like this: [thisOne setCOMMENT:[row objectForKey:@"COMMENT"]]; but later on in assignments to elements I get an error of *** -[NSNull length]: selector not recognized since it's a null and not a string. How do I test this coming from the db and set it to an empty string? I tried this if ([row objectForKey:@"COMMENT"] != NULL) but it's not a null, it's an object with a name of NSNull which I don't know how to deal with! Help! |