Stored Procedures and BD Browser for SQLite

58 views
Skip to first unread message

Totò Fiandaca

unread,
Jan 17, 2024, 3:13:16 PMJan 17
to SpatiaLite Users
I created a SQL script using the stored procedures, in spatialite_gui everything works fine but if I connect the same database in BD Browser for SQLite [1] with mod_spatialite.dll extension, the stored procedures don't work, the query gives me an error, it doesn't find the related functions to the stored procedure.

do I need to install other libraries in DB Browser, or do stored procedures only work in spatialite_gui or cli?


saluti

a.fu...@lqt.it

unread,
Jan 17, 2024, 5:02:50 PMJan 17
to spatiali...@googlegroups.com
Hi Toto',

"the query gives me an error" is too much generic; _WHICH_ error ?

I can just take a blind guess.
As the documentation clearly states [1], all functions related to
Stored Procedures require to be explicitly enabled by setting the
environment variable "SPATIALITE_SECURITY=relaxed"
if not, they'll appear to be unsupported.

spatialite_gui always automatically defines this external
variable, but when using different tools it's under your
responsibility to set the environment as required.

bye Sandro

Totò Fiandaca

unread,
Jan 18, 2024, 5:19:00 AMJan 18
to spatiali...@googlegroups.com
I ran this query:
SELECT
   SqlProc_SetLogfile(
     'D:\logfile.txt', -- absolute path to the log file
     1
   );
  and it gave me the error:

Execution completed with errors.
Result: no such function: SqlProc_SetLogfile
On line 1:
SELECT
   SqlProc_SetLogfile(
     'D:\logfile.txt', -- absolute path to the log file
     1
   );

I added, as suggested, the variable SPATIALITE_SECURITY= relaxed

and now it works.

thanks so much for everything

--
You received this message because you are subscribed to the Google Groups "SpatiaLite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spatialite-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/spatialite-users/6f4f3fbddc1138b34682c74fad9748e8%40lqt.it.


--
Ing. Salvatore Fiandaca
mobile.:+39 327.493.8955 
m: pigrecoin...@gmail.com
C.F.: FNDSVT71E29Z103G
P.IVA: 06597870820
membro QGIS Italia - http://qgis.it/
socio GFOSS.it - http://gfoss.it/

43°51'0.54"N  10°34'27.62"E - EPSG:4326

“Se la conoscenza deve essere aperta a tutti,
perchè mai limitarne l’accesso?” 
R. Stallman

Questo documento, allegati inclusi, contiene informazioni di proprietà di FIANDACA SALVATORE e deve essere utilizzato esclusivamente dal destinatario in relazione alle finalità per le quali è stato ricevuto. E' vietata qualsiasi forma di riproduzione o divulgazione senza l'esplicito consenso di FIANDACA SALVATORE. Qualora fosse stato ricevuto per errore si prega di informare tempestivamente il mittente e distruggere la copia in proprio possesso.


Reply all
Reply to author
Forward
0 new messages