On Aug 10, 2008, at 2:12 PM, CAVALO SCHMIDT wrote:

> salutations, using VC++ in WinXP.
>
> I would like to know if it's possible to import and use the
> sqlite3.dll file and/or the sqlite database file as a resource in a
> C++ project, so that it will be integrated to the final Win32
> executable. how would it be possible to use sqlite3_open with a
> database file stored as a resource in the application?


If you want a stand-alone executable, do not use sqlite3.dll.   
Instead, use the source code file "sqlite3.c" and compile it into your  
application.

If you have the content of an SQLite database file stored as a  
constant array of bytes in your program, you could have sqlite3 open  
this constant array as if it were a read-only database file by writing  
and registering your own custom VFS layer that reads from the constant  
byte array rather than a file.  You do not have to modify any of the  
core SQLite code to do this, but you do need to write your own VFS  
module, which will require that you have a deep understanding of how  
the SQLite core operates.


D. Richard Hipp
[EMAIL PROTECTED]



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to