[Gambas-user] Error ODBC
Benoît Minisini
g4mba5 at gmail.com
Wed Jul 14 19:03:11 CEST 2021
Le 14/07/2021 à 18:14, Benoît Minisini a écrit :
> Le 14/07/2021 à 17:52, Benoît Minisini a écrit :
>> Le 13/07/2021 à 13:34, Hans Lehmann a écrit :
>>> Hello,
>>>
>>> I have - following the wiki on the subject of ODBC - defined a DSN
>>> (dsn_sl3_contacts), behind which lies a SQLite3 database.
>>> Checking in a console with the program 'isql' gave the expected results:
>>>
>> > [...]
>>
>> I didn't find a SQLite ODBC database driver on my Ubuntu? Did I miss it?
>>
>
> OK, I confirm the bug.
>
I identified two problems:
1) The record count is badly computed because apparently some of the
ODBC functions return unexpected incoherent results.
The workaround is to switch to no record count mode.
2) 'gb.db.odbc' tries to set the ODBC statements scrollable flag, so
that it can freely switch between rows. The ODBC driver returns a
success (i.e. it tells "you can do that"), but then either it fails to
switch to a row or to return row contents without raising any error at all.
I will try to find a workaround too.
Maybe it's me or ZxMarce that do not use the API the right way. Probably
it's ODBC that is wrong.
So I suggest NOT using ODBC at all as much as possible.
It's a mess.
No driver behaves the same. To make ODBC really transparent in Gambas,
one will have to write one code different for each ODBC driver, making
all the ODBC thing irrelevant.
My two cents.
--
Benoît Minisini
More information about the User
mailing list