Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
214 Building Air ApplicAtions st.addEventListener(SQLEvent.RESULT, onStatementSuccess); st.addEventListener(SQLErrorEvent.ERROR, onStatementError); st.text = sql; st.execute(); This is one way to interact with the database, but it is not considered a good way. For example, we need to pass parame- ters when we want to insert an item in the table, like in this SQL statement. "INSERT INTO people (firstName, lastName) VALUES ("Cesare", "Rocchi")"; Porting this into ActionScript we get to a pretty messy code, where it is easy to get lost or mistype a comma or quote. var name:String = "Cesare"; var surname:String = "Rocchi"; var s:String = "INSERT INTO people (firstName, lastName) "+ "VALUES ("+name+", "+ surname + ")";