Microsoft KB Archive/135310

{|
 * width="100%"|

INF: Desktop Driver SQLCOnfigDataSource Exclusive Keyword

 * }

Q135310

-

The information in this article applies to:


 * Microsoft Open Database Connectivity, version 2.0
 * Microsoft SQL Server version 6.0

-

SUMMARY
The allowed values for the Open Database Connectivity (ODBC) Desktop Drivers SQLConfigDataSource lpszAttributes Exclusive keyword are zero (for false) and one (for true).

MORE INFORMATION
The SQLConfigDataSource lpszAttributes Exclusive keyword is used to control whether a Desktop Database ODBC data source will open the associated database file in exclusive or shared mode. If Exclusive=1 is specified, the file opens in exclusive mode. If Exclusive=0 is specified, the file opens in shared mode. The default is Exclusive=0. See the Desktop Driver help file for additional information on the Exclusive keyword.

Example:

The following Win32 code segment creates an ODBC data source named ExcSample to open the ODBC Software Development Kit (SDK) Access SAMPLES.MDB file in exclusive mode:

  void Config_Sample(void) {           RETCODE retcode; extern  HWND   hWnd;               /* Main window handle. */

// Create an Access datasource, set Exclusive = True. UCHAR  *szDriver = "Microsoft Access Driver (*.mdb)"; UCHAR  *szAttributes = "DSN=ExcSample\0FIL=MS Access\0JetIniPath=odbcddp.ini\0" "DBQ=c:\\odbcsdk\\smpldata\\access\\sample.mdb\0" "DefaultDir=c:\\odbcsdk\\smpldata\\access\0" "Exclusive=1\0";

retcode = SQLConfigDataSource(hWnd,              ODBC_ADD_DSN,               szDriver,               szAttributes); if (retcode != TRUE) handle_error(retcode); return; } Additional query words: 2.00.2317 sql6 SQLConfigDataSource desktop driver

Keywords :

Issue type :

Technology : kbSQLServSearch kbAudDeveloper kbSQLServ600 kbODBCSearch kbODBC200