[Gambas-user] Issue 446 in gambas: Select statement returns no data

gambas at ...2524... gambas at ...2524...
Wed Jun 26 01:17:47 CEST 2013


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

New issue 446 by BugCatch... at ...626...: Select statement returns no data
http://code.google.com/p/gambas/issues/detail?id=446

1) Describe the problem.
I have written this query, but it does not return any data:
Select * From Inventory Where InventoryId In ( 'Select InventoryId From  
Topics2InventoryXref Where TopicId = 18') order by Description

Does Gambas support this kind of SQL query?



I even tried it without the "order by Description" with the same results:
sqlite3: 0x20045a0: Select * From Inventory Where InventoryId In ( 'Select  
InventoryId From Topics2InventoryXref Where TopicId = 18')
rsInventory.Count = 0
rsInventory.Available =
rsInventory.Max = -1

I have checked the Gambas Documentation Wiki, gambasdoc.org, sourceforge  
and the internet for hints on how to fix this problem.

I have checked that each select by itself does return data:
sqlite3: 0x20045a0: Select InventoryId From Topics2InventoryXref Where  
TopicId = 18
rsXref.Count = 65

sqlite3: 0x168fe10: Select * From Inventory Where InventoryId In (300, 311,  
322, 53451, 62520)
rsInventory.Count = 5
rsInventory.Available = True
rsInventory.Max = 4


I even changed the fields in the DB so that they are integers and have  
matching names for the same field in the two different tables. No luck.

I tried using the "edit" version as well as the DB.substitution approach,  
but no luck.

What say ye, oh great and wise ones?

2) GIVE THE FOLLOWING INFORMATION (if they are appropriate):

Version: TRUNK or BRANCHES/2.0 or 2.22.0
Revision: r1234 (if you use a development version)
Operating system: Linux / FreeBSD
Distribution: Ubuntu / Fedora / ArchLinux / Gentoo ...
Architecture: x86 / x86_64 / ARM
GUI component: QT3 / QT4 / GTK+
Desktop used: Gnome / KDE ...

3) Provide a little project that reproduces the bug or the crash.
See attached Test Bed project.

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


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

Start program in IDE
Wait till tables have been filled. Go to "Topics" tab.
Double-Click on the "Book of Mormon" entry.

Program will stop and console will show:"

Kaaabooom!
Kaaabooom!


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:
	ChurchLibraryInteger.sqlite  109 KB
	LibraryDatabaseProgram - New all integer DB --Test Bed.tar.bz2  129 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