Friday, June 26, 2009

Aubit4GL: connecting to mysql and informix concurrently

Since database connections seems to be compile time, and you have to set A4GL_SQLTYPE in order to compile against database X - I wonder how you can open concurrent connections.. I cannot find any documentation on how to do this - but according to http://aubit4gl.sourceforge.net/aubit4gldoc/manual/html/features_summary.html it maybe that you have to use ODBC connections to each instead of native??

It seems that "open session" and "use session" can be used to dynamically switch at runtime. But compile time seems to be the kicker.. especially if you use "define x like table.column" in 4gl, unless it allows "define x like db.table.column" or searches both databases.

1 comment:

  1. True - you can only connect to one type of datatype (SQLTYPE) as a time.
    You could use ODBC to open sessions to different database types .
    You can also use 2 4gl programs and have them talk using RPC.

    Finally - you can link your 4gl application against either libmysqlclient or ESQL/C - and use Aubit for the other database connection..

    (I've done this for connecting between Informix and Postgresql for example..)

    ReplyDelete