Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Robert S. on February 24, 2020, 12:32:57 pm



Title: ODBC connection to MacroBASE
Post by: Robert S. on February 24, 2020, 12:32:57 pm
Hi
In Genero I would like to connect to the MacroBASE database. Is it possible? I have the ODBC driver installed in windows and the connection works. Do I need additional dll files in dbdrivers?



Title: Re: ODBC connection to MacroBASE
Post by: Sebastien F. on February 24, 2020, 01:50:38 pm
Hello Robert,

You can try with the dbmodc ODI driver.

Setup the ODBC data source and if the connection test works you should have all you need to connect also from Genero programs and execute basic SQL statements.

Keep in mind that dbmodc is a generic ODI driver that does not do any Informix emulation.
It may also not work with all SQL data types of the MacroBASE engine.

However, basic SQL should be possible.

Seb


Title: Re: ODBC connection to MacroBASE
Post by: Robert S. on February 25, 2020, 09:24:26 am
Hi.
I've tried dbmodc3x before and got an error: Could not set SQL_ATTR_AUTOCOMMIT
 | sqlcode         : -6319
 |   sqlstate      : HY000
 |   sqlerrd2      : -1
 |   sql message   : Internal error in the database library. Set FGLSQLDEBUG to get more details.
 |   sql msg param :
 | curr driver     : ident='dbmodc3x'
 | curr connection : ident='none' (dbspec=[none])
 | Execution time  :   0 00:00:02.54300
 | s:\fgl\ports\w64-vc90\src\sqldriver\stdodbc\odc.c:00121(2)  : Could not free environment handle...
 | curr driver     : ident='dbmodc3x'
 | curr connection : ident='none' (dbspec=[none])
 | Execution time  :   0 00:00:02.54300
 | s:\fgl\ports\w64-vc90\src\sqldriver\stdodbc\odc.c:00121(2)  : Could not free environment handle...
Fatal error -6319
Internal error in the database library. Set FGLSQLDEBUG to get more details.

I set FGLSQLDEBUG=10

Robert


Title: Re: ODBC connection to MacroBASE
Post by: Sebastien F. on February 25, 2020, 09:46:00 am
Hello Robert...

I wonder... what Genero version are you using?

Seb


Title: Re: ODBC connection to MacroBASE
Post by: Robert S. on February 25, 2020, 09:48:52 am
The old one 2.40


Title: Re: ODBC connection to MacroBASE
Post by: Sebastien F. on February 25, 2020, 10:01:10 am
The generic ODBC ODI driver in Genero version 2.40 has a strict limitation when auto-commit is not allowed by the ODBC driver / database.
This is why you get this error message.

The generic ODBC ODI driver in recent versions of Genero is more flexible, and accepts the connection when auto-commit is not available.

Please try with Genero 3.20.

Seb


Title: Re: ODBC connection to MacroBASE
Post by: Reuben B. on February 25, 2020, 08:32:08 pm
For completeness, I'll just add the link to the issue where this was fixed in 2013  https://4js.com/support/issue/?id=FGL-02912