Assuming that the data source to be connected to is available, i.e. it has an entry in ODBC.INI file which can be checked by running Microsoft ODBC Administrator, it can be connected to in the following way:
If the connection is successful, the system will give a positive response of yes. This step is necessary before anything can be done with the data sources since it gives XSB the opportunity to initialize system resources for the session.
To close the current session use:
and XSB will give all the resources it allocated for this session back to the system.