There are two ways of using a new version of TSqlite*Dataset (the one found in this site or customized by the programmer):

  1. Replace the provided unit binaries by the compiled version of the new units 
  2. Add the directory of the new files to the compiler path

Approach 2 is the easiest and is straightforward. But under some circumstances (a Lazarus application) the compiler will give an error. So here are the steps to replace the compiled binaries. They are valid for fpc2.2.4

Replace the default binary units (recommended)

Compile the new units
  • Open a terminal/command prompt
  • Set the current working directory to the directory where the source files are
  • Type: fpc -O2 -gl sqlite3ds.pas

You should have now *.ppu and *.o files


  1. If the fpc executable is not in the path then is necessary to provide the full path of the fpc executable
  2. -gl option will allow to debug the code, but will increase the file size. It's optional.
  3. Be sure to use the same compiler version as the units will be replaced
Find the default unit folder

Under windows:
[fpc install dir]\units\i386-win32\fcl-db

Under Linux


Copy the new compiled *.ppu and *.o files to the default units folder. A backup of the old units is always good idea.

If you are using Lazarus, recompile the IDE.

Add the new unit path to the compiler path (for the lazy only)

This is the easiest way but can lead to errors in some circumstances.

But what hell of error is this?

fpc will try to recompile units built with the older version, but will not succeed. To get this error just start a new Lazarus project, add the directory with the new units in Units path (compiler option), add a TSqlite3Dataset component to the form. Try to compile. BUM!.

Is not that bad at all. To "fix", open the main program file (lpr) and remove the sqlite3laz unit from the uses clause. As a bonus you get a smaller application ;-)


Make a Free Website with Yola.