Database concepts
Informix® servers can handle multiple database entities, while SQLite can manage several database files.
Solution
Map each Informix database to a SQLite database file.
Consider creating the SQLite database file before using the connection instruction. The database file can be created as an empty file, with a OS shell command (touch) or by program by using the file utility classes.
CONNECT TO or DATABASE
instructions:DATABASE "/opt/myapp/database/stock1.dbs"However, it is recommended to use an indirection by providing an abstract name identifier in
the program, and by defining the real database file with the "source" connection
parameter. The file defined by "source" is then found directly (can
be a relative or absolute path), or by using DBPATH settings, if not found from
the current directory of fglrun (when it's not an absolute path).
In the program:
DATABASE stock
In the FGLPROFILE configuration file, define the SQLite driver and the database file:
dbi.database.stock.driver = "dbmsqt"
dbi.database.stock.source = "/opt/myapp/database/stock1.dbf"
dbi.database.stock.source = "stock1.dbf"The file is
found by using DBPATH:DBPATH="/opt/myapp/database"
:memory: as database file name, an empty SQLite database is
created in memory. This can be useful if the persistence of the data is not required after the
program has terminated:DATABASE ":memory:"