Hi all!
First off, my configuration:
Windows 7 Ultimate x64
SQLite3 v3.7.14 Amalgamation, compiled to DLL using VS2010
Used directives:
SQLITE_4_BYTE_ALIGNED_MALLOC (*)
SQLITE_THREADSAFE=2
SQLITE_OMIT_DEPRECATED
SQLITE_DEBUG (*)
SQLITE_MEMDEBUG (*)
(*) Tried both with and without these
Now, my problem...
I am trying to create a virtual table module in my Delphi application
using my own interface to SQLite3.dll.
All tests so far of my interface are working correctly, i.e. queries,
preparations, functions etc.
Now, I'm trying to implement virtual tables, but I seem to be in over my
head with this.
I tried creating a super simple test which just return "default" values
on all calls.
This is the order my functions are being called:
xCreate (enter function)
xCreate (exit function)
xConnect (enter function)
xConnect (exit function)
At this point I get an access violation in SQLite3.dll (reading of
address 00000008)
I have tried everything I can think of, but this is how far I get.
I then tried a simple test in VS2010 where I include sqlite3.h (that is,
no DLL).
Using the same calls/queries as in Delphi, I get this order of calls:
xConnect (enter function)
xConnect (exit function)
xDisconnect (enter function)
xDisconnect (exit function)
xConnect (enter function)
xConnect (exit function)
xCommit (enter function)
xCommit (exit function)
xBestIndex (enter function)
xBestIndex (exit function)
And here the application crashes sending Windows to search for a solution.
The SQL statement used to create my virtual table, in both cases, is:
CREATE TABLE x (Severity TEXT, Source TEXT, IP TEXT, Message TEXT)
And, finally, both cases are run against a newly created database.
Does anyone have any ideas to what I'm doing wrong?
Anyone having some source of how to implement a really simple virtual
table (in any language)?
I am aware of that I am uncertain of how to implement xBestIndex, but
that is my next headache, I guess... :)
Best regards all!
/Jörgen
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users