Creates a ODBC data source.

CreateSQLDataSource(cDataSource, cDriver, nDataSourceType)

Parameters

cDataSource

A list of attributes in the form of keyword-value pairs seperated by CHR(0).
E.g. "DSN=Personnel Data" + CHR(0) + "UID=Smith" + CHR(0) + "PWD=Sesame" + CHR(0) + "DATABASE=Personnel"

cDriver

Driver name, a list of drivers can be retrieved with the ASQLDrivers function.

nDataSourceType
One of the following values.
DatasourceTypeDescription
ODBC_USER_DSNCreates a user data sources.
ODBC_SYSTEM_DSNCreates a system data sources.

Return Value

.T. if the data source was created, .F. otherwise.

See Also

Reference

ASQLDataSources
ASQLDrivers
ChangeSQLDataSource
DeleteSQLDataSource
SQLCancelEx
SQLExecEx
SQLGetPropEx
SQLPrepareEx
SQLSetPropEx

Used WinApi functions

SQLConfigDataSource