SQL adaptation guide for SQLite 3.x / Database concepts |
Informix® servers can handle multiple database entities, while SQLite can manage several database files.
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.
DATABASE "/opt/myapp/database/stock1.dbs"
However, it is recommended to use an indirection by using 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 according to 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"And the file would be found by using DBPATH:
DBPATH="/opt/myapp/database"
DATABASE ":memory:"