[Gambas-user] ODBC - unable to fetch row

PICCORO McKAY Lenz mckaygerhard at gmail.com
Sun Feb 21 16:48:28 CET 2021

hey zxMarce any new about odbc working?

El vie, 22 de ene. de 2021 a la(s) 22:17, <d4t4full at gmail.com> escribió:

> (hope I'm replying to the right address, and sorry for top-posting:
> writing from phone)
> I did download at home Northwind.Mdb, MS's test Access database, and -sure
> enough- got the same issue.
> Now, thanks to the pandemic, my dev machine is not easily reachable for me
> as it is at the office.
> I will try to make some time as soon as possible to get a dev environment
> and check why MDB data fetch fails. If I do get to the actual issue, I'll
> try to fix it, but can't really promise anything.
> I got to fix Firebird in the past, but this sounds a little trickier.
> Regards,
> zxMarce.
> On Jan 22, 2021, at 11:18, "Benoît Minisini" <g4mba5 at gmail.com> wrote:
>> Le 22/01/2021 à 15:13, KKing a écrit :
>>>  So my original issue may be related to mdbtools and debian in that most
>>>  doco suggests the odbc.ini Driver setting should relate to the section
>>>  name in /etc/odbcinst.ini in Debian mdbtools standard install would be
>>>  [MDBTools] but this fails with isql and only works if the odbc.ini
>>>  Driver setting points to the actual driver file in
>>>  /usr/lib/..../libmdbodbc.so
>>>  I am guessing the Gambas odbc component is not coping with this... will
>>>  try to look into the gb.db.odbc code.
>>>  But I also have a another odbc question. While trying to test out if it
>>>  is more mdbtools and or debian I have setup a test to point to a sqlite
>>>  db via odbc (yes I know gambas can go direct)
>>>  isql select * from sampleTable returns 1,000 records ... but the
>>>  following Gambas code only returns the first record?
>>>>    Dim $con As New Connection
>>>>    Dim intCount As Integer
>>>>    Dim rs As Result
>>>>    Dim $ExecCmd As String
>>>>    Try $con.Close()
>>>>    $con.Type = "odbc"
>>>>    $con.Host = "mysqlitedb"
>>>>    $con.Open()
>>>>    $ExecCmd = "SELECT * FROM sampleTable "
>>>>    rs = $con.Exec($ExecCmd)
>>>>    intCount = rs.Count
>>>>    While (rs.Available)
>>>>      Print "s_seq:" & rs!s_seq
>>>>      rs.MoveNext
>>>>    Wend
>> It's hard for me to help, as I don't know ODBC and didn't write the driver.
>> But I know that the ODBC driver exposes many ways of browsing the result
>> of a query, and I guess the failure is related to that. Maybe failing to
>> use the accurate request browsing method, and/or detecting the end of
>> the query result list... ?
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210221/1fa4ce88/attachment.htm>

More information about the User mailing list