Reputation: 1
I'm new to Flex and Adobe AIR, but I'm writing a desktop application that will need to connect and query commercial databases such as DB2, SQL Server and Oracle. How do I connect to these type of databases from ActionScript in an AIR application?
Upvotes: 0
Views: 2869
Reputation: 1451
I only know that it can connect directly to SQLite with Flex AIR. I know that the safari browser will have it's own datastore soon, so perhaps you can develop something in that vein.
Upvotes: 0
Reputation: 4236
You really can't do it nicely, AIR is meant to use web servers as data sources not DBs, and there are no DB drivers in actionscript ready. That being said there are a few things that you can try:
All in all, if you want to use DB-s as data sources AIR should probably not be your choice for a project.
Upvotes: 2
Reputation: 11054
AFAIK even air does not connect to a DB directly. You can however use ZendAMF (AMFPHP), SabreAMF, coldFusion, or any of several other ways to connect to DBs.
I personally use an HTTPService to call a php page that ouputs a query in XML.
There are so many ways to do this it would be hard to say what is right for you. Look up remoteObject and HTTPService example and find what's going to suit you best.
Upvotes: 0
Reputation: 10046
See my answer from this SO question: Database abstraction layer for AIR (JS)?
Upvotes: 0