ODBC Database Connection Module
This module implements ODBC interface to connect to relational databases. Using this module you can use SQL RDBMS implementations from Windows/Unix/Linux platform independant of the actual database system.
Though this module does not deliver all functions of the ODBC system it does implement most of the functions that are needed to write SQL based applications. You can connect to ODBC databases, disconnect, issue SQL commands and retrieve the data resulted by the queries.
To use this module from a BASIC program you have to include the file odbc.bas with the line
import odbc.bas
to have all the neccessary function defintiions. This file and the neccessary odbc.dll (or odbc.so) are installed in the include and in the modules directories on Windows.
A typical BASIC application using this module first calls Connect or RealConnect to get a connection to the database. Then the program calls Query to execute SQL queries, altering the database and FetchHash and/or FetchArray to get the result of queries. Finally the program optionally calls Close to close the connection.
(Calling Close is optional. Close is automatically called for each opened database connection when the interpreter finishes.)
The underlying ODBC system layer implements connection pooling on process level. Thus there is no need to use the ScriptBasic resource pooling module as it is done by the MySQL module. (By the time I write this the ScriptBasic resource pool support module is still experimental, and so is the MySQL module interface utilizing it.)
When the ODBC module is initialized the module requests the underlying ODBC layer to perform process level connection pooling. The module also implements the multi-thread interface functions that allow the module to remain in memory if used in multi-thread application.
The module raises module specific errors. For more information see Error.