Tags: air

Working AIR / SQLite DataGrid example

!!!August 24 - The following code is for example only - DON'T copy and paste... the lovely little syntax highlighter screwed up casing and tag names. Just pay attention to the methods noted above and general structure.. I'll post up the correct files later on Okay so in my excitement to check out AIR/Apollo I tried to get the SQLite connection working. The sample code in the livedocs on one of the initial Flex Builder builds (the online docs have since been corrected), had a few errors in it ... So I reworked an example from start to finish to: 1. Open a connection 2. Create a table 3. Populate the table 4. Fetch from the table 5. Put results into a dataprovider. A couple of errors that will set you wrong in the docs, I've highlighted them below **. (Adobe ... feel free to put this into your examples and tidy it accordingly) 1. The example accesses SQLDBStatement, which doesn't exist - it's called SQLStatement 2. Instead of the method .db on SQLStatement it's .sqlConnection. Which will get you a working connection. Application File - test.mxml

	

Datagrid component - com/rowanh/components/Customers.mxml (note watchout for the cdata tags when you copy and paste... syntax highlighting isn't perfect)


	
		
           
	   
	   
        
blog comments powered by Disqus
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.