Inter-Application Communication on Windows
viktoras at ekoinf.net
Thu Feb 14 07:30:19 CST 2008
in one of my applications I use shell to communicate with sqlite for
data .import and revolution's sqlite to query and modify the same
database. It was never corrupted... Maybe just because .importing and
modification are sequential and do not attempt to modify the same
database in the same time.
I am frequently using an instance of commandline sqlite and an instance
of sqlitespy for some database tests - it possibly can corrupt the
database, but so far this has never happened.
Accessing the same sqlite database should not make any big troubles
unless both sqlite instances modify the database simultaneously. In this
case you may try implementing some sort of locking mechanism. But then
the solution with file would be simpler.
I did a test with a very very simple sqlite app - it did not corrupt the
database even if many instances of it were running... So you can read,
insert or delete a record in a table with one instance and read it with
another and vice versa... But I guess there are scenarios when the
database can get corrupt.
The zipped folder with both the compiled app (for Windows) and the
source can be downloaded from:
> Since they are two standalone applications they will have different
> engine's and different SQLite libraries, so I don't think you could
> access the same database with it getting corrupted. If you know a way
> do this this I'd be VERY interested.
> All the Best
> On 13 Feb 2008, at 19:08, viktoras didziulis wrote:
>> What about the 2 applications connecting to the same sqlite database
>> - one updates the db, the other checks whether and how it was updated?..
>> Richard Gaskin wrote:
>>> Dave wrote:
>>>> I have an application that periodically creates or updates an
>>>> SQLite database (actually there are lots of databases (separate
>>>> SQLite files), but only one is worked on at a time) and then sends
>>>> the results to the server. This process can take upwards of 15
>>>> minutes to complete. In the meantime I want to be able to still
>>>> use the application to do other things (such as create playlists
>>>> in iTunes).
>>> I'd use sockets, or polling for a file. While polling a file's
>>> content can eat some cycles, polling for the existence of a file is
>>> pretty darn fast. Given the scenario you describe, where you're not
>>> really expecting a result for several minutes, you could probably
>>> get away with polling for a file every few seconds. Cheap, simple,
>>> reasonably efficient.
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
More information about the use-livecode