Do the changes made in sql reflected in core data?
<p>I have sql as well as core data being used in my application.Now, if i make some changes suppose, update the sql db using sql queries i have those update made.If i make fetch request and print the array i see the same old value unless i quit the app and restart it.I am not able to understand this behavior.I wanted to know that if changes are made in sql db then do those changes reflect in core data table? If not, then do i have to save the updated values in coredata well and will it lead to duplicate or redundant data? 
     This is the code being used to update values:<br>
          I have an array containing values: </p>

<pre><code>   - (void) updateGeneraldata3 :(NSArray*) marrDataUpdate 
    {
                                                                                                   sqlite3 *database;
sqlite3_stmt *update_statement = nil;

if(sqlite3_open([strDatabasePath UTF8String], &amp;database) == SQLITE_OK)
{
    NSString *strMQueryupdate = [NSString stringWithFormat:@"UPDATE zform_general_data1 SET zChk_Mild='%@', zChk_CTV='%@', zChk_DOA='%@',           zChk_ALS1='%@' where zautonumber='%@'",[marrDataUpdate objectAtIndex:0],[marrDataUpdate objectAtIndex:1],[marrDataUpdate objectAtIndex:2],[marrDataUpdate objectAtIndex:3],autoNumberTextField.text];

    const char *sql = [strMQueryupdate UTF8String];

    if (sqlite3_prepare_v2(database, sql, -1, &amp;update_statement, NULL) != SQLITE_OK) {
        NSLog(@"update fails");
    }
    else
    {

        sqlite3_bind_text(update_statement, 1, [[marrDataUpdate objectAtIndex:0]  UTF8String], -1, SQLITE_TRANSIENT);
        sqlite3_bind_text(update_statement, 2, [[marrDataUpdate objectAtIndex:1]  UTF8String], -1, SQLITE_TRANSIENT);
        sqlite3_bind_text(update_statement, 3, [[marrDataUpdate objectAtIndex:2]  UTF8String], -1, SQLITE_TRANSIENT);
        sqlite3_bind_text(update_statement, 4, [[marrDataUpdate objectAtIndex:3]  UTF8String], -1, SQLITE_TRANSIENT);           
      int success = sqlite3_step(update_statement);
        sqlite3_reset(update_statement);
        if (success == SQLITE_ERROR){}
        else {}
    }
    sqlite3_finalize(update_statement);
   }
   sqlite3_close(database);   

   }
                                                                   And after update there is a background function which is executed after every 60 seconds of time .Now if i change the value of these fields on the view using the respective text fields, it updates the value in db using the above code which is also being executed after a certain interval of time  :                                                                                        


 -(void) functServerPostingData  

 {

 @try 
  {
    @autoreleasepool {


    generalDataObject = [[GeneralData alloc] init];
    generalData1_Array=[[NSArray alloc]init];
           [self checkUsedAutoNumber];
    NSError *error;
    NSManagedObjectContext *mocGeneral1 = [self managedObjectContext];
    NSEntityDescription *entityDescriptionGeneral1 = [NSEntityDescription
                                                      entityForName:@"Form_General_Data1" inManagedObjectContext:mocGeneral1];
    NSFetchRequest *requestGeneral1;

    requestGeneral1 = [[NSFetchRequest alloc] init];

    [requestGeneral1 setEntity:entityDescriptionGeneral1];

    generalData1_Array=[mocGeneral1 executeFetchRequest:requestGeneral1 error:&amp;error];
     NSLog(@"generalData1_Array :%@",generalData1_Array);
                if(!generalData1_Array)
    {

        NSLog(@"Error fetching Login: %@", [error localizedDescription]);
        abort();

    }


    for(int i = 0; i&lt; [generalData1_Array count]; i++)  {
        for (int j=0;j&lt;[[strAutoNumber componentsSeparatedByString:@","] count] ; j++)
        {

            if([[[generalData1_Array objectAtIndex:i] Autonumber ] isEqualToString: [[strAutoNumber componentsSeparatedByString:@","]objectAtIndex:j]])
            {
                generalDataObject.AutoNumber=[NSString stringWithFormat:@"%@",[[generalData1_Array objectAtIndex:i] Autonumber ]]; 

                generalDataObject.Chk_Mild =[[generalData1_Array objectAtIndex:i]Chk_Mild];

                generalDataObject.Chk_CTV=[[generalData1_Array objectAtIndex:i]Chk_CTV];


                generalDataObject.Chk_PAU=[[generalData1_Array objectAtIndex:i]Chk_PAU];
                                   generalDataObject.Transient=[[generalData1_Array objectAtIndex:i]Transient];

              generalDataObject.Chk_ALS1=  [[generalData1_Array objectAtIndex:i]Chk_ALS1];


              [generalDataObject startPostServerData];
            }
        }
    }

    if (generalDataObject.checkRequest==TRUE) 
    {
        [appDelegate CheckInternetConnection];
        if(appDelegate.internetWorking==-1)
        {
        }
        else {
            serverLinkToHit = [NSString stringWithFormat:@"%@/ReceiveData.aspx?m=InsertData&amp;t=GeneralData",[serverLinkSettings getServerLink ]];
            [generalDataObject readServerData:serverLinkToHit postServerData:generalDataObject.finalDataString];
        }

    }
    generalDataObject = nil;
        requestGeneral1=nil;
        requestGeneral2=nil;
    }
    } 
@catch (NSException *exception)
  {
    [ExceptionLog LogEntry:exception :@"Error while entering data functServerPostingData"];
 }


 }
</code></pre>

<p>I have printed the array which always shows the previous old value irrespective of what i have entered in text field and saving in db.However, at the same place i print the values of sql db they are updated.Shall i use sql select to select value put it in an array and then post?                                                               </p>
