• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

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

Guest
Mar 14, 2012 Mar 14, 2012

Copy link to clipboard

Copied

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.Field1;                                                  

    RecordToAdd.Field2 = LocalDatabase.Field2;

    ...                              

    createMydataTableResult.token = MydataTableService.createMydataTable(RecordToAdd);

    createMydataTableResult.token = MydataTableService.commit();

  }

}

TOPICS
PHP

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Mar 16, 2012 Mar 16, 2012

solved...!  ...just had to avoid null fields in RecordToAdd

Votes

Translate

Translate
Guest
Mar 16, 2012 Mar 16, 2012

Copy link to clipboard

Copied

solved...!  ...just had to avoid null fields in RecordToAdd

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 25, 2012 Jun 25, 2012

Copy link to clipboard

Copied

LATEST

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines