INF: Desktop Driver SQLCOnfigDataSource Exclusive Keyword

Last reviewed: September 9, 1996
Article ID: 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 reference words: 2.00.2317 sql6 6.00 SQLConfigDataSource desktop
driver
KBCategory: kbprg
KBSubcategory: SSrvProg



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 9, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.