SQLConfigDataSource adds, modifies, or deletes data sources. The function returns TRUE if it is successful, FALSE if it fails. When
SQLConfigDataSource returns FALSE, an associated *
pfErrorCode value can be obtained by calling
SQLInstallerError.
' ****************************************************************************************
' This example creates an Access database.
' SED_PBCC - Use the PBCC compiler
' ****************************************************************************************
' ****************************************************************************************
' To create a databse that is compatible with Microsoft Access 2.0 use:
' r = SQLConfigDataSource(0, %ODBC_ADD_DSN, "Microsoft Access Driver (*.mdb)", "CREATE_V2DB=new.mdb")
' ****************************************************************************************
#COMPILE EXE
#INCLUDE "TB_ODBC352.INC"
' ========================================================================================
' Main
' ========================================================================================
FUNCTION PBMAIN
LOCAL r AS INTEGER
r = SQLConfigDataSource(0, %ODBC_ADD_DSN, "Microsoft Access Driver (*.mdb)", "CREATE_DB=new.mdb")
IF ISTRUE r THEN
PRINT "Database created"
END IF
WAITKEY$
END FUNCTION
' ========================================================================================