[Gambas-user] Issue 579 in gambas: Sqlite Conn.Exec failure with a CTE query
gambas at ...2524...
gambas at ...2524...
Mon Nov 17 23:39:37 CET 2014
Status: New
Owner: ----
Labels: Version-TRUNK Type-Bug Priority-Medium OpSys-Any Dist-Any Arch-Any
Desktop-Any GUI-Any
New issue 579 by brucedot... at ...626...: Sqlite Conn.Exec failure with a CTE
query
https://code.google.com/p/gambas/issues/detail?id=579
I have a common table expression (CTE) query that I want to use on an
Sqlite3 database. Essentially its goal is to return a result for a
hierarchical data table in such a way that all parent items are listed
before their children.
The same query works properly in the sqlite3 CLI utility but fails when run
either in a program using Connection.Exec() or in the IDE database browser.
The same query works on a postgresql database in the CLI utility, in a
gambas program and in the IDE database browser.
I have checked through the sqlite3 website and cannot see any reference to
a known error with the API.
____________________________________________________________
1) Describe the problem.
The CTE query in the attached project fails with a DBError code of 1 when
issued from a gambas program against an sqlite3 dtabase.
2) Give information about your system. Use the 'System information' menu in
the Gambas IDE, and paste the result there.
[System]
Gambas=3.6.90
OperatingSystem=Linux
Kernel=3.12.18-pclos2
Architecture=x86
Distribution=PCLinuxOS
Desktop=LXDE
Theme=QWindows
Language=en_AU.UTF-8
Memory=1008M
[Libraries]
Cairo=libcairo.so.2.11200.16
Curl=libcurl.so.3.0.0
Curl=libcurl.so.4.3.0
DBus=libdbus-1.so.3.7.8
GStreamer=libgstreamer-0.10.so.0.30.0
GStreamer=libgstreamer-1.0.so.0.403.0
GTK+3=libgtk-3.so.0.1200.2
GTK+=libgtk-x11-2.0.so.0.2400.22
OpenGL=libGL.so.1.2.0
OpenGL=libGL.so.173.14.39
OpenGL=libGL.so.96.43.23
Poppler=libpoppler.so.13.0.0
Poppler=libpoppler.so.19.0.0
Poppler=libpoppler.so.46.0.0
Qt4=libQtCore.so.4.8.5
SDL=libSDL-1.2.so.0.11.4
3) Indicate the Gambas version in the issue labels, and if it is a bug, a
crash, or an enhancement request.
rev 6652
4) Provide a little project that reproduces the bug or the crash.
Attached.
5) If your project needs a database, try to provide it, or part of it.
The attached project contains code and scripts to create the necessary
database.
6) Explain clearly how to reproduce the bug or the crash.
In the attached project are three modules and an sqlite ".READ" script.
The postgresql modules are only there to demonstrate that the query works
against a postgresql database and can be ignored if you accept that it does
work.
1) Create the required "democte" in your home directory as follows:
[you at ...3396... ~]$ sqlite3 democte
sqlite> .echo on
sqlite> .read <decompressed project path>/demo.sql
(This creates the database, creates the "pages" table, loads the sample
data, lists it and finally runs the said CTE query.)
2) Ensure that the MSqlite module is the startup class and run it.
Attachments:
execCTE-0.0.1.tar.gz 5.0 KB
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
More information about the User
mailing list