How to store the Data from Parse.com to Sqlite DataBase in iOS? -


I am using parse.com to get data as given below. I have already created the data base using the SQLite manager

  - (IBAction) button: (ID) sender {PFQuery * postQuery = [PFQuery query worldname: @ "movie"]; // movie is the name of the class in parse.com, which stores the data in that two columns [postcontic object in backgroundwith block: ^ (nsary * objects, nsERr * error) {if (error!) Save // ​​save result Update table to poster = objects; NSLog (@ "Array ....% @", self.postArray); // [spinner start-up]; [Self.myTableRedloadData]; }}]; } - (zero) getTheData: (id) sender {// this is sqlite query class model = [[ddmodel alloc] init]; // Insert here the method to send the column square object (buk). [Model insertInformIntoDB: buk]; PFObject * Post = [self.postArray objectAtIndex: indexPath.row]; NSLog (@ "posttttt ......% @", post); // Here parse.com column name to send the data to the squid column. Bk.name = [post objectForKey: @ "name"]; Buk.Hero = [Post ObjectForcae: @ "Hero"]; }   

I found the output like this:

// This entire movie class

  array .... (" Lt; Movie: EHx3UonJmw: (null) & gt; {\ nHero = Mahesh; \ nName = Pokiri; \ nNumber = 222; \ n} "," << Movie: zekgTzIsLs: (null)> {\ NHero = Pure; \ nName = Joni; \ nContact number = 412; \ n} "," movie: 0z3ZkI4lvB: (ft)> {\ nHero = Prabhas; \ nName = darling ; \ N number = 312; \ n} ") PostState ...... and Lieutenant; Movie: EHX3UJJMW: (Faucet) & gt; {Hero = Mahesh; Name = pokiri; Number = 222; }   

Error: -

  Exclude the application 'NSInvalidArgumentException' due to exception exception, Reason: '*** + [NSMutableString stringWithUTF8String]: NULL cString '  

But here we are getting zero values ​​in buk.name and Hero ....

You make the question so confusing, but still I would love to show what could be wrong, [insert insertIntoDB: buk]; should be at the end of the method, where you set the property buk variable

  - (zero) getTheData: (ID) sender {// it Sqlite query class model is [= [datamodel alloc] init]; // Insert here the method to send the column square object (buk). // Transfer this statement at the end, inserting buk without setting the values ​​/ / [insertInformIntoDB: buk [Model]; PFObject * Post = [self.postArray objectAtIndex: indexPath.row]; NSLog (@ "posttttt ......% @", post); // Here parse.com column name to send the data to the squid column. Bk.name = [post objectForKey: @ "name"]; Buk.Hero = [Post ObjectForcae: @ "Hero"]; // Save Book [Model insertInformIntoDB: buk]; }    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -