Skip navigation
Currently Being Moderated

flash builder 4.6 - send batch data to server (php connected)

Mar 14, 2012 7:08 AM

Hi, I've recently downloaded flashbuilder 4.6 and started to develop my first mobile app.

Just to explain the sense of my problem/question,  I'd like to manage a local database offline (insert data to a table) and manually sincronize it to a server database (push a button -> add records batch to table in server).

Following tutorials I was able to manage a sqlite local database, I got the connection to server database (mySQL) with php and have Data/Services panel populated (services test works fine).

 

Unfortunately I'm not able to send local data, batch to server. A few lines of code below (debugging I got no errors and no results).

Something wrong on the code?

Or did I take a wrong way to solve my problem?

 

thanks in advance for interest

 

 

protected function button_clickHandler(event:MouseEvent):void

{

 

var LocalDatabase:ArrayCollection = ... <loaded from sqlite database>

 

var RecordToAdd: MydataTable;    //server data table to fill

 

for (var i:int= 0; i<LocalDatabase.length; i++)

{     

    RecordToAdd = new MydataTable;

    RecordToAdd.Field1= LocalDatabase[i].Field1;                                                  

    RecordToAdd.Field2 = LocalDatabase[i].Field2;

    ...                              

    createMydataTableResult.token = MydataTableService.createMydataTable(RecordToAdd);

    createMydataTableResult.token = MydataTableService.commit();

  }

}

 
Replies
  • Currently Being Moderated
    Jun 25, 2012 4:14 AM   in reply to stefanba

    Hello

    you said "Following tutorials I was able to manage a sqlite local database, I got the connection to server database (mySQL) with php and have Data/Services panel populated (services test works fine)."

    can you indicate some tutorials with that? i am trying to do the same thing but i'm having some trouble...

    thanks

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points