Another few questions I've been searching high and low for answers on.

1) My Flex Builder Beta 3 does not seem to have some classes / methods? Like flash.data.SQLMode? and the openAsync() method.
Any idea why that would be missing or how to get it installed?

2) Most importantly, Does anyone have a favorite method to write from an Array that is received from FDS to a local SQLlite database? When I try to loop through like this which I have modified from an example:

------------BEGIN CODE------------------------------
conn = new SQLConnection();
dbFile = File.applicationStorageDirectory.resolvePath("myDB.db");
conn.open(dbFile);

conn.begin();
var dropCreate:SQLStatement = new SQLStatement();
var insertRow:SQLStatement = new SQLStatement();
dropCreate.sqlConnection = conn;

                        
var sql:String = "DROP TABLE IF EXISTS users; CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT,fName TEXT,lName TEXT,email TEXT,phone TEXT,city TEXT,state TEXT,zip TEXT,lsFName TEXT,lsLName TEXT,lsEmail TEXT,lsPhone TEXT,lsCity TEXT,lsState TEXT,lsZip TEXT)"
dropCreate.text = sql;
dropCreate.execute();
                        
var numRecords:int = users.length;

for(var i:int = 0; i < numRecords; i++)
{
        insertRow.sqlConnection = conn;
sql = "INSERT INTO users (id ,fName ,lName ,email ,phone ,city,state,zip,lsFName,lsLName,lsEmail,lsPhone,lsCity,lsState,lsZip) VALUES " +
                                "(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)";
        insertRow.text = sql;
                                
        // set parameter values
        insertRow.parameters[ 0] = users[i].id;
        insertRow.parameters[ 1] = users[i].fName;
        insertRow.parameters[ 2] = users[i].lName;
        insertRow.parameters[ 4] = users[i].phone;

        insertRow.execute();
}
conn.commit();
------------END CODE------------------------------

I get an error saying that SQLStatement.text property can't be changed as below: Error: Error #3106: Property cannot be changed while SQLStatement.executing is true.
        at Error$/throwError()
        at flash.data::SQLStatement/set text()
at data::SQLHandler/createAndFillUserTable()[my/path/here/ SQLHandler.as:79]

I'm trying to create an offline copy of our online database for quicker response and then will update / sync the server when connected.

and...
3) Before I start looking at code samples Is there any way to develop using LiveCycles on a Mac?

Thanks in advance... again!

Scott




On Dec 28, 2007, at 12:13 PM, Jeffry Houser wrote:


 You probably need to create a new services-config file with a hard
coded URL to the flex2gateway.
 I suspect (but haven't tested) that you need a cross domain file in
the root of your server for Flash to access it.

Scott Mulder wrote:


I currently have a perfectly working RemoteObject on my shared hosting
server (where I can’t install my own server level stuff).  After much
messing around with the complier arguments it now connects just fine to
the standard /flex2gateway/ pointer and a ColdFusion Service which
returns native AMF binary objects so it’s nice and fast.  I am now
trying to set up an AIR app that connects to the same CF Service and
gets all of the same data in the local app where it is stored offline in
an SQLlite DB and synced on changes.



Any suggestions on how to get the same connection working when the app
runs locally?



Thanks in advance!


Scott


--
Jeffry Houser, Technical Entrepreneur, Software Developer, Author,
Recording Engineer
AIM: Reboog711  | Phone: 1-203-379-0773
--
My Company: <http://www.dot-com-it.com>
My Podcast: <http://www.theflexshow.com>
My Blog: <http://www.jeffryhouser.com>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links




Reply via email to