SQlite3 Load extension -- not authorized

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
qlands
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: 16.08.2010, 14:12

SQlite3 Load extension -- not authorized

Post by qlands »

Hi,

I am using ZeosLib in Delphi 2007. I am trying to load the spatialite extension using the following code:

Code: Select all

Zconnection1.Connected := true;
   ZQuery1.SQL.Clear;
   ZQuery1.SQL.Add('SELECT load_extension(''libspatialite-2.dll'')');
   ZQuery1.ExecSQL;
   messagedlg('After extention',mtinformation,[mbok],0);
However I have the message: "Not authorized". By searching on the internet it seems that I need to call the function sqlite3_enable_load_extension(sqlite3 *db, int onoff).

However how call the function using ZeosLib?

Regards,
Carlos
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Have a look at the Open procedure in ZDbcSqlite.pas file on how SSL connctions are handled. I'd be glad if I could merge your solution in the definitive zeoslib distro.

For questions : just contact me.

Mark
Image
Post Reply