Re: Little question involving sqlite.dll
- Posted by ghaberek (admin) Mar 23, 2023
- 748 views
jessedavis said...
Thanks for the quick reply! I am using eusqlite3.ew from the archives.
converted SQLite 28.15 21/12/2004 C M Burch
converted SQLite 3.0.8 21/12/2004 C M Burch
Oof, that's mighty old. Try using the wrapper I linked to instead. It's built around SQLite3 3.33.0 and includes a few helpful additions.
You can run make sqlite3 (or mingw32-make sqlite3 on Windows) to build the shared library from the files in the src/ directory.
Here are the functions I've added so far. Each of these will builds a parameterized statement, execute it, capture the result, finalize the statement, and return the result as indicated.
- sqlite3_exec_stmt() returns the status code of the statement, helpful for doing INSERT/UPDATE/DELETE
- sqlite3_exec_scalar() returns the first column of first row as {status,value}, helpful for querying IDs values, etc.
- sqlite3_query_row() returns first selected row as {status,row}, helpful for querying single items
- sqlite3_query_rows() returns all selected rows as {status,{row1,...}}, helpful for querying lists of items
- sqlite3_query_map() same as sqlite3_query_row() but the row is a map instead of a sequence
- sqlite3_query_maps() same as sqlite3_query_rows() but each row is a map instead of a sequence
- sqlite3_backup() uses the Online Backup API to export an open database to another file
-Greg