ID: Q135310
2.00.2317 6.00 WINDOWS kbprg
The information in this article applies to:
The allowed values for the Open Database Connectivity (ODBC) Desktop Drivers SQLConfigDataSource lpszAttributes Exclusive keyword are zero (for false) and one (for true).
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 reference words: 2.00.2317 sql6 6.00 SQLConfigDataSource desktop
driver
KBCategory: kbprg
KBSubcategory: SSrvProg
Keywords : SSrvProg
Version : 2.00.2317 6.00
Platform : WINDOWS
Last Reviewed: September 10, 1996