|
From: <d4t...@gm...> - 2016-11-16 19:32:23
|
Hi there. Intro: I'm enhancing Gambas3 (a VisualBasic lookalike for Linux, "but not a clone!") ODBC component. It was kinda non-functional and still lacks functionality, but I got it to the point of being able to connect and retrieve data from MSSQL servers via unixODBC and FreeTDS. I also installed the ODBC driver for Firebird because a Gambas user noticed that the component was retrieving Firebird data incorrectly. The problem was fixed and the component now is up to par with MSSQL, except for one thing. The component populates a high level BASIC property with the Database name (this would be the Catalog name in MSSQL parlance). I cannot get this name correctly from Firebird. I'm calling SQLGetConnectAttr() with the SQL_ATTR_CURRENT_CATALOG attribute, but it does not seem to return anything meaningful. It usually returns a 2-char string, whose 2nd char is not printable, and the first one is normally a lowercase "L", but the database has no L's in its name. Since this is an ODBC-2 attribute I thought it should work. It certainly does under MSSQL. Is there anything I can do to get the DB/catalog name correctly? Thanks, zxMarce. |