Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delphi7 & SpatiaLite

Status
Not open for further replies.

joeUW

Programmer
Jan 27, 2010
1
US
Any examples of how to use SpatialLite from Delphi 7?

I have some old FF2 (Flash Filer) database files I'm trying to read into a spatialite database. Delphi 7 seems to be the latest version that supports the FF component.

When I try to insert data into a table with a geometry field - but not trying to populate the geometry field - it throws an exception.

"INSERT INTO MyClients (clientID,ClientName,contactID) VALUES
('{79...8F}','client-1','');"
-OR-
"INSERT INTO MyClients (clientID,ClientName,contactID,the_geom) VALUES
('{79...8F}','client-1','','');"
"no such function: GeometryConstraints'.

So I tried :
slDb := TSQLiteDatabase.Create(slDBFile);
slDb.ExecSQL('SELECT load_extension(''libspatialite-2.dll'');');
and got a "not authorized." error

The DLLs below all reside in the runtime directory.
sqlite3.dll
libspatialite-2.dll
libproj-0.dll
libiconv2.dll
libgeos_c-1.dll
libgeos-3-1-0.dll
libcharset1.dll

How do I get load_extension('libspatialite-2.dll') to work?

Once I get it to work how do I populate the geometry field with the equivalent of a null object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top