Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 16th, 2012  |  syntax: None  |  size: 0.47 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. iphone method return NSString returns nothing
  2. - (NSString *) GetText:(char*) FieldName  compiledStatement:(sqlite3_stmt*)  cs {
  3.     char *c = (char *) sqlite3_column_text(cs,  [self get_column_index:cs zName:FieldName] ) ;
  4.  
  5.     if (c != NULL)  return  (NSString *)c; else return @"";
  6. }
  7.        
  8. User = [self GetText:"Name" compiledStatement:compiledStatement];
  9.        
  10. NSString *User;
  11.        
  12. if (c != NULL)
  13.     return [NSString stringWithCString:c encoding:NSUTF8StringEncoding];
  14.  
  15. return @""