http://gambaswiki.org/bugtracker/edit?object=BUG.1013&from=L21haW4-

Comment #10 by zxMarce:

Christian,

Finally! I installed FB2.5, the ODBC driver, and even got a simple test DB with 
an eight record table, hand populated with ye olde ZX-Spectrum colors (fields 
ColorName and ColorValue).
Also connected to it successfully with a Connection String instead of an 
INI-based DSN. Sweet!

I think I may have a little insight regarding this issue, not having done yet 
any code changes.
The problem *seems* to be that the rec count routine does its work, but for 
some reason FB driver returns a zero-based record count.
When I run "SELECT * FROM Colors", I get back 7 records instead of 8. When I 
run "SELECT COUNT (*) FROM Colors" or "SELECT AVG (ColorValue) FROM Colors" 
instead, I get -as you do- 0 records back.
All of these statements work correctly on FlameRobin, of course!

BenoƮt further patched gb.db so when it gets back a record count of -1 the 
component simply keeps getting records until there are no more; that is why it 
works with SQLRowCount() which, as you know, returns -1.
When gb.db gets anything besides -1, it will loop fetching as many records as 
told. In the case of FB, it fails to retrieve correctly because the low-level 
driver returns a zero-based count via unixODBC.

Paraphrasing Matt Damon in "The Martian": I will have to science the f*ck out 
of it. Will start burning some neurones.

zxMarce changed the state of the bug to: Working.



------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to