Before you can use SQL commands, you need to connect to the SQL database system. The SQLConnect function provides this access. You need to call this function before any other SQL functions. It has the format:
the connection string, for example:
hSQL = SQLConnect("DSN=DBASE_FILES;DB=C:\ODBC\EMP;LCK=NONE;CS=ANSI");
! Connect to a dBASE Compatible Database File.
hSQL = SQLConnect("DSN=EXCEL_FILE;DB=C:\ODBC\EMP;FS=10");
! Connect to an Excel File.
hSQL = SQLConnect("DSN=ORACLE_TABLES;SRVR=X:ACCTS;UID=SCOTT;PWD=TIGER");
! Connect to an Oracle Database.
Refer to the documentation that accompanied your SQL server for details about connecting to an SQL database.