[Gambas-bugtracker] Bug #2171: gb.db.odbc: unable to convert date

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Thu Apr 29 19:10:25 CEST 2021


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

Comment #11 by Gianluigi GRADASCHI:

This is the code that links to a firebird table:



Public Sub Main()
  
  Dim hRes As Result  

  Db.Debug = True ' enable debug messages
  Try hRes = DbMistral.Exec("SELECT * FROM AABI_BANCHE;")
  If Error Then
    Print "Error";; Error.Text;; Error.Code
  Endif
  
End


The program does not go into error, in the result where there are dates it returns a null value.

This is the debugging of the function:





2021-04-29 18:40:10.750 gb.db.odbc: GetConnectedDBName: desc->name: NULL
2021-04-29 18:40:11.558 gb.db.odbc: SQLGetStmtAttr SQL_ATTR_ROW_NUMBER
2021-04-29 18:40:11.558 gb.db.odbc: 1:2400:0:[unixODBC][Driver Manager]Invalid cursor state
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: First recno=0
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: Last recno=826
2021-04-29 18:40:11.558 gb.db.odbc: GetRecordCount: Record count=827
2021-04-29 18:40:11.558 gb.db.odbc: do_query: create handle 0x563bf4abc5d0
2021-04-29 18:40:11.558 gb.db.odbc: query_init: 0x563bf49c2348 -> 9 columns
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 0x563bf49c2348 (9 columns)
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_PK' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_X' -> type = 1
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DMOD' -> type = 93
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DCRE' -> type = 93
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_UMOD' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_UCRE' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_DES1' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_MNEMONICO' -> type = 12
2021-04-29 18:40:11.558 gb.db.odbc: query_make_result: 'AABI_CIN' -> type = 1
2021-04-29 18:40:11.558 gb.odbc: query_fill: 0x563bf49c2348: 0 (0)
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_PK (12) = 01000
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_X (1) = 
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DMOD (93) = 
gb.db.odbc: unable to convert date: 
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DCRE (93) = 2016-09-29 10:50:29
gb.db.odbc: unable to convert date: 2016-09-29 10:50:29
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_UMOD (12) = 
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_UCRE (12) = andrea
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_DES1 (12) = BANCA D'ITALIA
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_MNEMONICO (12) = 
2021-04-29 18:40:11.558 gb.db.odbc: query_fill: AABI_CIN (1) = 
2021-04-29 18:40:11.686 gb.db.odbc: query_release: 0x563bf49c2348: free handle 0x563bf4abc5d0




More information about the Bugtracker mailing list