title: sqlite3_column_text returns NULL when there is data in the database
body: <p>My database is defined as the following</p>
  
  <pre><code>CREATE TABLE [problems] (
  [p_id] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 
  [problem_name] VARCHAR(255) NOT NULL, 
  [mixed_t1] INT NOT NULL, 
  [mixed_t2] INT NOT NULL, 
  [mixed_flair] INT, 
  [mixed_gre] INT, 
  [mixed_diffusion] INT, 
  [mixed_adc] INT, 
  [fat_sat_post_t1] INT)
  </code></pre>
  
  <p>In my code, I'm trying to run an SQL query that looks like</p>
  
  <pre><code>SELECT problem_name from problems WHERE mixed_t1=0
  </code></pre>
  
  <p>Then in code, I'm trying to assign the problem_name to a NSString and then add the NSString to an NUSMutableArray</p>
  
  <pre><code>if(sqlite3_step(statement) == SQLITE_ROW)
  {
  
      NSString *problemName = [NSString stringWithUTF8String:(char *)sqlite3_column_text(statement, 1)];
  
      [dataSet addObject:problemName];
  
      [problemName release];
  }
  </code></pre>
  
  <p>The problem is that I'm crashing at NSString *problemName</p>
  
  <p>I get the following crash message</p>
  
  <pre><code>Current language:  auto; currently objective-c
  2011-02-08 08:54:29.035 RadAppz[1332:207] *** Terminating app due to uncaught exception    'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString'
  </code></pre>
  
  <p><em>*</em> Call stack at first throw:</p>
  
  <p>I know I'm getting data because executing the RAW SQL in Terminal returns 2 rows. Can someone please tell me why the data is being returned as NULL?</p>