I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-) At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file): sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core' Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04. Best regards Jörg Hofmann
On Sat, Oct 6, 2018 at 8:01 PM Jörg Hofmann
I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04.
hm I will look into asap. -- luigi
On Sat, Oct 6, 2018 at 9:02 PM luigi scarso
On Sat, Oct 6, 2018 at 8:01 PM Jörg Hofmann
wrote: I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04.
hm I will look into asap.
The relevant docs are
tex/texmf-context/doc/context/documents/general/manuals/swiglib-mkiv.pdf tex/texmf-context/doc/context/documents/general/manuals/sql-mkiv.pdf The old svn site is gone , the new one is https://serveur-svn.lri.fr/svn/modhel/swiglib (see http://www.luatex.org/download.html) -- luigi
On 10/6/2018 8:01 PM, Jörg Hofmann wrote:
I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04. did you read the sql manual in the distribution ... it should work okay (no need for special lua module, all in the distribution)
Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hallo Hans, hallo Luigi, Am Samstag, den 06.10.2018, 20:01 +0200 schrieb Jörg Hofmann:
I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04.
Best regards Jörg Hofmann _____________________________________________________________________ ______________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/nt g-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net _____________________________________________________________________ ______________
Many thanks for your help. I have read both manuals but may not understand it correctly. That's why I send my file and the log file. Best regards Jörg
On Sun, Oct 7, 2018 at 9:35 AM Jörg Hofmann
Hallo Hans, hallo Luigi,
Am Samstag, den 06.10.2018, 20:01 +0200 schrieb Jörg Hofmann:
I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
hm, sqlite uses luaffi, not swiglib.
Put libsqlite3.so in the same folder of your example, and rename it
as sqlite3.so
Then put in your example
\setuppapersize[A4]
\enabletrackers[resolvers.ffilib]
\enabletrackers[sql.trace]
\enabletrackers[sql.queries]
I think that at least you should see something like
found: '/
Hallo Hans, hallo Luigi,
Am Samstag, den 06.10.2018, 20:01 +0200 schrieb Jörg Hofmann:
I've been trying to connect ConTeXt to sqlite for almost a week but I have repeatedly failed. Neither the "internal" variant according to the documentation, nor the attempt on luasql have worked. Above all, the Google request showed me that not alone with this problem - how reassuring. ;-)
At the moment, concentrate I am accessing via swiglib and think my problem lies here (from my log file):
sql> start loading method 'sqlite' swiglib> unknown: 'swiglib.sqlite.core' swiglib> unknown: 'swiglib.helpers.core'
Obviously, the appropriate modules are not found, but where Can I get them and where do they belong? And maybe also someone a working code example for me. I'm working with Texlive 2017 on XUBUNTU 16.04.
Many thanks for your help. I have read both manuals but may not understand it correctly. That's why I send my file and the log file.
On 10/7/2018 9:35 AM, Jörg Hofmann wrote: the latest versions of context use ffi for mysql and sqlite interfacing so you just need the libraries if you add \enabletrackers[*ffi*] to your file you get something ffilib > requiring library 'sqlite3' with version 'any' ffilib > tds path 1: . ffilib > tds path 2: c:/data/develop/tex-context/tex/texmf-win64/bin/lib/context/lua// ffilib > tds path 3: c:/data/develop/tex-context/tex/texmf-win64/bin/lib/luatex/lua// ffilib > tds path 4: c:/data/develop/tex-context/tex/texmf-win64/bin/lib//lua// ffilib > attemp 1, engine 'luatex' ffilib > checking tds lib paths strictly ffilib > checking with version: 'sqlite3.dll' ffilib > found: 'c:/data/develop/tex-context/tex/texmf-win64/bin/lib/luatex/lua/copies/sqlite/sqlite3.dll' ffilib > stored library: 'sqlite3' sql > loading method 'sqlite' done anyway, best keep your libe in the tex tree because otherwise you get some random one that is found on your system attached a better example file (hard to test without a database here so need to make one ... next time proviode a real mwe) in util-sql-imp-sqlite.lua remove a pragma line so we get: local f_preamble = formatters[ [[ ATTACH `%s` AS `%s` ; PRAGMA `%s`.synchronous = normal ; ]] ] ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl -----------------------------------------------------------------
Hallo Hans, hallo Luigi, thank you for your help. After I've re-installed ConTeXt, everything works fine. Have a nice weekend Jörg Am Sonntag, den 07.10.2018, 16:06 +0200 schrieb Hans Hagen:
anyway, best keep your libe in the tex tree because otherwise you get some random one that is found on your system
attached a better example file (hard to test without a database here so need to make one ... next time proviode a real mwe)
in util-sql-imp-sqlite.lua remove a pragma line so we get:
participants (3)
-
Hans Hagen
-
Jörg Hofmann
-
luigi scarso