Note that there are some explanatory texts on larger screens.

plurals
  1. POSqlite database doesn't update the data from web services
    primarykey
    data
    text
    <p>I am doing an app which gets JSON datas from the web service and update it in the SQLite database. My problem is i got the values from web services but while uploading it shows 'null'. its not getting updated.</p> <p>my code:-</p> <pre><code>-(void) updateSignupTable: (NSDictionary*) json { //copying the values from web services NSString *balance = [json objectForKey:@"balance"]; NSString *phone_number =[json objectForKey:@"sim_number"]; NSString *call_forward_Status = [json objectForKey:@"call_forward_status"]; </code></pre> <p>//Storing it in the database</p> <pre><code> sqlExecutObj.sql=[NSString stringWithFormat:@"UPDATE profile_table SET phone_number ='%@' balance = '%@' call_forward_status = '%@' WHERE profile_name= '%@'", phone_number ,balance, call_forward_Status, profileDetailTitle]; sqlExecutObj.dataTypeArray=[[NSMutableArray alloc]initWithObjects:@"1",@"1",@"1",nil]; [sqlExecutObj executeSelectQuery]; ///reloading the table [profileDetailView.detailsTableView reloadData]; // fetch and print the updated datas from SQLite sqlExecutObj.sql=[NSString stringWithFormat:@"SELECT call_forward_status,phone_number,balance FROM profile_table WHERE profile_name= '%@'",selectedProfileName]; sqlExecutObj.dataTypeArray=[[NSMutableArray alloc]initWithObjects:@"1",@"1",@"1",nil]; [sqlExecutObj executeSelectQuery]; NSLog(@"result from table are: %@. and %@, and %@", [[sqlExecutObj.result objectAtIndex:0] objectAtIndex:0],[[sqlExecutObj.result objectAtIndex:1] objectAtIndex:0],[[sqlExecutObj.result objectAtIndex:2]objectAtIndex:0] ); } </code></pre> <p>My debug output:-</p> <pre><code>2013-05-14 15:54:02.910 Movirtu[44262:19d03] result from table are: (null). and (null), and (null) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload