简体   繁体   中英

AS3/Flash/Air: Database sharing

I have an AIR application that stores data in XML files. The databases is located in the documentsDirectory folder of a main computer.

Is it possible to update the data of the XML files from other computers of a network?

Many thanks in advance.

UPDATE:

hypothetically:

  • We have a server
  • We have a shared folder with read/write access.
  • In the folder we have the database files (XML)

Is it possible to update the database file from any computer with access to the shared folder?

Thanks

You can write to the file, but it won't work if multiple application tries to write the file at the same time. And, lets say app A changes one data, and app B changes another data. App A writes the new XML, then B writes its own version of the XML without acknowledging the changes from A. The changes from A are lost.

One way to go here is SQLite. Natively supported in AIR. But then again, you can not write the file at the same time from 2 different apps. AIR is supposed to handle those writing issues, but i already experienced some problems with it.

A much better way to go here would be setting a SQL server up (or any other real DB server, i am no expert) and some php interface. Maybe AMFPHP : http://gotoandlearn.com/search.php?q=amf , or simply use urlloaders ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM