Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

Embedded-SQLite3-for-Delphi

SQLite3 wrapper for Delphi. Supports both dynamic and static linking (with a creative solution). Higher level classes for convenience. Support for Unicode and BLOBs.

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

Embedded SQLite for Delphi

This project provides a Delphi translation for the SQLite API and some handy classes for convenience. Supports both dynamic and static linking (with a creative solution). Support for Unicode and BLOBs.

For Windows applications.

Currently translated SQLite version: 3.42.0

API structure

This API mimics the structure of the SQLite documentation:

Note that:

  • Some SQLite functions has not been translated.
  • Most translated functions were not tested.
  • Even if they work, their data types may be wrong or may be improved.

How it works

Both 64 and 32 bits versions of "Sqlite3.dll" are included at build time as a resource. See resource/How-to.txt for instructions. At app initialization, the proper dll is extracted to a temp file and linked dynamically.

How to upgrade to newer versions of SQLite3

Many source code is machine-generated, which is much less prone to human error. Such code is generated from SQLite3.Core.Prototypes Edit such a file in order to include new SQLite3's function prototypes. SQLite3's new data types should be declared at SQLite3.Core.Objects. Then, add a call to GenCode(TypeInfo(<<new function prototype>>)) at program SQLite3CodeGen.

Compile, build and run project SQLite3CodeGen.exe. Console output is part of the code that must be copy-pasted into SQLite3.Core.Functions: half to the interface section, half to the implementation section, which is noted at console output.

Did you know that Delphi already provides built-in support for SQLite ?

Yes. I'm aware of that. At the the time this project was born (but not published yet), there were no built-in SQLite support in Delphi.

However, there are still a number of reasons not to use FireDAC. For example, smaller binaries and portability.

Where is the documentation?

Look for commentaries at the source code.