[Gambas-user] ODBC - unable to fetch row

Karl Reinl karl.reinl at fen-net.de
Fri Jan 29 23:13:14 CET 2021


Am Freitag, den 22.01.2021, 19:51 -0400 schrieb PICCORO McKAY Lenz:
> HEy kicking177 check #1100 
> http://gambaswiki.org/bugtracker/edit?object=BUG.1100
> 
> odbc cannot count on resultset.. is not part of the standar cos not
> all the db's can report it check my documentation: 
> http://gambaswiki.org/wiki/howto/odbcdatabase#t7
> 

Salut,

new on unixODBC, I played around and tried connecting a MS-SQL Server
2017 hosted on a docker based on Ubuntu 16.04 by using latest msodbcsql
driver.
This is the output, and it shows me that gb.db.odbc can fetch rows, but
not the used odbc driver:

2021-01-29 22:30:52.138 gb.db.odbc: GetConnectedDBName: desc->name (6
chars): 'master'
2021-01-29 22:30:52.138 gb.db.odbc: 0x5601ae6b5f98: select name from
sys.databases
2021-01-29 22:30:52.146 gb.db.odbc: SQLGetStmtAttr SQL_ATTR_ROW_NUMBER
2021-01-29 22:30:52.146 gb.db.odbc: 1:24000:0:[unixODBC][Driver
Manager]Invalid cursor state
2021-01-29 22:30:52.159 gb.db.odbc: GetRecordCount: First recno=1
2021-01-29 22:30:52.171 gb.db.odbc: GetRecordCount: Last recno=9
2021-01-29 22:30:52.176 gb.db.odbc: GetRecordCount: Record count=9
2021-01-29 22:30:55.430 gb.db.odbc: GetConnectedDBName: desc->name (10
chars): 'mytest2017'
2021-01-29 22:31:23.699 gb.db.odbc: 0x5601ae6b5f98: SELECT name FROM
SYSOBJECTS WHERE xtype = 'U' order by name;
2021-01-29 22:31:23.744 gb.db.odbc: SQLGetStmtAttr SQL_ATTR_ROW_NUMBER
2021-01-29 22:31:23.744 gb.db.odbc: 1:24000:0:[unixODBC][Driver
Manager]Invalid cursor state
2021-01-29 22:31:23.748 gb.db.odbc: GetRecordCount: First recno=1
2021-01-29 22:31:23.753 gb.db.odbc: GetRecordCount: Last recno=99
2021-01-29 22:31:23.755 gb.db.odbc: GetRecordCount: Record count=99

This is the output if 'show database requests' is on.

But also to say gb.db.odbc can' fill Databases and Tables list
correctly (cOrg.Tables.Count = 1045 ) in real ,you see the count
 above 
ther are 99 Tables.

-- 
Amicalement
Charlie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210129/647c26a4/attachment.htm>


More information about the User mailing list