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 -----------------------------------------------------------------