"Jacek Oleksy" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello, > I'm using VC++.NET 2003 & Windows XP SP2. > I have following problem with version 3.6.0: > > sqlite configuration is being hold in a global variable sqlite3Config. > > My application uses a dll, which initializes sqlite database. Dll's > copy of the sqlite3Config variable is initialized properly and sqlite > calls from inside the dll work fine.
Is this DLL statically linked to SQLite, or itself uses sqlite3.dll? > However, the main module's copy of sqlite3Config is still empty and > when I try to use the database from the main module a crash occurs in > sqlite3_mutex_enter. It can be avoided by initializing sqlite in main > module (e.g. by opening a database and closing it). > > The question is: can I use one database connection (one sqlite3 > pointer) in multiple modules? In such case database operations from > main module and from dll will be using different sqlite3Config > variables, is it safe? If you have several modules, each statically linked with SQLite, then you have multiple copies of SQLite runtime in the same process. This is a recipe for disaster. Such configuration can only works if modules' usage of SQLite is completely isolated: they don't pass SQLite resources (e.g. connectionn or statement handles) across module boundaries, and they don't attempt to work against the same database file at the same time. Would it be possible to get all modules to use SQLite DLL? Then all your problems will go away. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

