[Gambas-user] ODBC - unable to fetch row

KKing kicking177 at gmail.com
Fri Jan 22 15:13:08 CET 2021


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
>




More information about the User mailing list