[Gambas-user] Issue 442 in gambas: SQL connection.Edit bug

gambas at ...2524... gambas at ...2524...
Thu Jun 20 16:50:52 CEST 2013


Status: New
Owner: ----
Labels: Type-Bug Priority-High OpSys-Any Dist-Any Arch-Any Desktop-Any  
GUI-Any

New issue 442 by BugCatch... at ...626...: SQL connection.Edit bug
http://code.google.com/p/gambas/issues/detail?id=442

1) Describe the problem.
Trying to delete a record in a Sqlite DB, so I used the "$hConn.Edit"  
function. I got the following error:

sqlite3: 0x139aa50: BEGIN
sqlite3: 0x139aa50: SELECT * FROM 'SELECT * FROM Topics where TopicId = 154'
sqlite3: 0x139aa50: ROLLBACK
QSpiAccessible::accessibleEvent not handled:  "2"  obj:   
QMessageBox(0x1557160) ""
FIXME: handle dialog start.
Query failed: SQL error or missing database
FIXME: handle dialog end.


I confirmed that the "Exec" command works fine, but that the "Edit" command  
duplicates part of the command when sending the SQL to the DB.

rsTopics = FMain.$hConn.Exec("SELECT * FROM Topics where TopicId = 154")
sqlite3: 0x1566df0: BEGIN
sqlite3: 0x1566df0: SELECT * FROM Topics where TopicId = 154


rsTopics = FMain.$hConn.Edit("SELECT * FROM Topics where TopicId = 154")
sqlite3: 0x150deb0: BEGIN
sqlite3: 0x150deb0: SELECT * FROM 'SELECT * FROM Topics where TopicId = 154'


2) GIVE THE FOLLOWING INFORMATIONS (if they are appropriate):
gambas3-ide 3.4.1-1raring2

[System]
OperatingSystem=Linux
Kernel=3.8.0-25-generic
Architecture=x86_64
Distribution=Ubuntu 13.04
Desktop=GNOME

GUI component: QT4 / GTK+


3) Provide a little project that reproduces the bug or the crash.
Public $hConn As New Connection
Private sAppPath As String
Dim rsTopics As Result

sAppPath = Str$(Application.Path)

sName = "churchlibrary.sqlite"

With $hConn
     .Type = "sqlite3"
     .Host = sAppPath          ' path to DB location which is the  
application.path
     .Login = "Librarian"      'Technically not needed, just for me
     .Password = "Righteous"   'Technically not needed, just for me
     .Name = sName
     .Port = ""                ' See note above ^
End With


$hConn.Open
$hConn.Begin

rsTopics = $hConn.Edit("SELECT * FROM Topics where TopicId = 154")


4) If your project needs a database, try to provide it, or part of it.
See attachment

5) Explain clearly how to reproduce the bug or the crash.
Run SQL command

6) By doing that carefully, you have done 50% of the bug fix job!

IMPORTANT NOTE: if you encounter several different problems or bugs, (for
example, a bug in your project, and an interpreter crash while debugging
it), please create distinct issues!


Attachments:
	churchlibrary.sqlite  107 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