A while back I worked on a Delphi wrapper for SQLite 3, which I published on this site as an open source project. Others amended it to support Free Pascal and Lazarus, so you can use it on Linux and on the Mac. I’ve not touched it for a couple of years; but recently received an email requesting support for the SQLite 3 backup API. There are only a few functions involved so I added them to the wrapper, and also updated the Sqlite DLL to version 3.7.5.
Although I used Delphi XE to work on the wrapper, I did the build for the repository with Delphi 7, running in a virtual machine, because I know this version still has plenty of use. The problem though is that Delphi 2009 introduced full Unicode support, causing compatibility issues. My wrapper is compromised because it uses the old AnsiString, so that it works with all Delphi versions. I have in mind to fix this so you get full Unicode support when I have time to do so.
There is no support for Delphi’s data binding, and the wrapper appeals to developers happy to code their own SQL. Of course it works like lightning.
Thank you!
Excellent! I suppose the updated version of your wrapper is compatible with the new Delphi Starter Edition, isn’t it?
As far as I know, the one who requested sql backup support was me 🙂
Thanks Tim for everything.
Nice that you did it, but what is the reason to publish this info without link to your work?
So nobody can use your work….
oh…. it is link!! Thanks – i am aftrer 8 hours of work, very tired….
Sorry for problems and once more – thanks!
I realize that this is a relatively old post, but I just noticed this code was updated. I use D7 daily (eek, I know) and have been trying to get the DLL into a resource file, which is done, and then trying to get my application to create/write the DLL file to the app directory prior to any sort of access to the physical sqlite3.dll file. I don’t like random DLLs hanging around in the c:windowsanything path and its a PITA when trying to give the app to friends who aren’t all that savvy to put a DLL somewhere, AND I’m too lazy to make an installer, especially for small updates. 😉
I’m asking for help to get one of the following done so the DLL is as transparent as possible;
1> Modify your code so that I can just include the unit and the DLL file is witten at run time if it doesn’t exist
2> Modify some code so that I can put the DLL in memory and run your calls based off that.
3> Setup D7 so that I can trace through the DPR and watch for when Application.CreateForm happens while one of my forms uses your units.
The web resource I’ve used to create the .RES file is here: http://delphi.about.com/od/windowsshellapi/l/aa012103c.htm
The resource file exists, and if I exclude the Application.CreateForm the code to create the form runs, and the DLL from the resource file is created. When I put the CreateForm back, the application runs as expected as the DLL exists.
The things I’ve tried:
– Moved the code given on the ABOUT.COM page prior to the Application.Initialize.
– Created a unit to specifically create the DLL and included the code in the INITIALIZATION section, then removed the code from the DPR
– Created a new blank form and set this form as the primary form, added to the INITIALIZATION form to execute the code from the ABOUT.COM page and then create the initial form.
It seems that the moment I reference the first unit, the DLL files existence is checked for and the app is forced to close.
Any ideas?