Communicating between to standalones with "write to process" - Found word(s) list error in the Text body

Bob Sneidar bobsneidar at iotecdigital.com
Sun Dec 1 18:37:33 EST 2013


They can but only one can have write access at a time. Since you cannot open sqlite read only in LC (that might be a nice feature), create a text file before opening database, checking first for its existence before opening. If it exists then another stack has it open. Once open, do your thing then close it (I never leave a sqLite db open if I am not reading from it or writing to it) then delete the text file. Alternatively, you can leave the text file in place and simply write the name of the stack currently using the database. You can get creative and add the time the database was opened, so if the current time is beyond 30 seconds of last opened time, there is probably something wrong and you can deal with it.

Of course you cannot use this strategy with iOS (no file system), but I think you probably can with Android.

Another option would be to have a hidden stack make the queries for your other stacks. Pass the sql statement in a function call to that stack and return the result of the query. Since only one stack is really opening the database, problem solved! Seems overkill though when you can simply install mySQL with a very small footprint, or else do what I do and get an on-rev account which has mySQL built in.


Bob Sneidar
IT Technician
Integrated Office Technology
bobsneidar at iotecdigital.com<mailto:bobsneidar at iotecdigital.com>
714-401-2407



On Nov 30, 2013, at 09:42 , Dr. Hawkins <dochawk at gmail.com<mailto:dochawk at gmail.com>> wrote:

really* nice would be for two livecode processes to be able to share a
SQLite :memory: database . . .




More information about the use-livecode mailing list