SQLite Data between Stacks
Posted: Wed Jul 31, 2013 3:54 pm
As I learn Livecode, I have been creating an application that I wrote in Adobe Air/Flash/Flex. This application has been ported to Livecode as a single stack which now I am rewriting it to include a method of updating it by splitting the stack into 2 stacks. The first stack is the Splash Screen Stack which handles the application registration, creating database tables, populating the database, downloading the Main Application Stack, checking versions between online website and current version on computer. The second stack has the rest of the application which takes the information from the database and displays icons on a Google Map.
My question is with the second stack. I am getting 0 records returned when executing the following code on tSelectMarketRecordCount. If I use an SQLite Viewer attached to the same SQLite database file with the tSelectMarketsSQL I get 23 records returned. If I change my original stack to use the same SQLite database file that this updated version of the application uses, I get 23 records.
In the first stack right before I goto the main stack I close the database connection and on the preOpenCard of the second stack I run a command to ConnectDatabase. I get an interger value on tSelectMarketsRecordSetID and an integer on sDatabaseID. I am just not sure what steps I can do to view why the revNumberOfRecords is returning a 0.
Any Suggestions
My question is with the second stack. I am getting 0 records returned when executing the following code on tSelectMarketRecordCount. If I use an SQLite Viewer attached to the same SQLite database file with the tSelectMarketsSQL I get 23 records returned. If I change my original stack to use the same SQLite database file that this updated version of the application uses, I get 23 records.
Code: Select all
put "Select MarketID, CallSign, City, State, BTALatitude, BTALongitude from Markets Order by State ASC, City ASC" into tSelectMarketsSQL
put the value of revQueryDatabase(sDatabaseID, tSelectMarketsSQL) into tSelectMarketsRecordSetID
put the value of revNumberOfRecords(tSelectMarketsRecordSetID) into tSelectMarketRecordCount
Any Suggestions