PRB: Driver Parameter for RegisterDatabase Limited to 31 Chars

Last reviewed: September 25, 1997
Article ID: Q172196
The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions, 16-bit only, for Windows, version 4.0 on the following platforms: NT, Win95

SYMPTOMS

With some ODBC drivers, the RegisterDatabase method of the DBEngine object will cause an error in the ODBC Administrator. The error message is:

   "The setup routines for the <driver name> could not be found. Please
   reinstall the driver."

CAUSE

This error will occur if the name of an ODBC driver contains more than 31 characters.

RESOLUTION

The workaround is to open ODBCINST.INI in a text editor (such as Notepad) and modify the names of the offending ODBC drivers to 31 characters or fewer. The names are listed under the section [ODBC Drivers]. Each ODBC driver will also have a section of its own. The names must be modified in both places. Please see below for an example.

The name for the Access driver is 32 characters:

   [ODBC Drivers]
   Access 2.0 for MS Office (*.mdb)=Installed

   [Access 2.0 for MS Office (*.mdb)]
   Driver=D:\WINDOWS\SYSTEM\ODBCJT16.DLL
   Setup=D:\WINDOWS\SYSTEM\ODBCJT16.DLL

The new name is only 24 characters:

   [ODBC Drivers]
   Access 2.0 for MS Office=Installed

   [Access 2.0 for MS Office]
   Driver=D:\WINDOWS\SYSTEM\ODBCJT16.DLL
   Setup=D:\WINDOWS\SYSTEM\ODBCJT16.DLL

The Visual Basic code to register an ODBC data source for the above driver is:

   DBEngine.RegisterDatabase "Test", "Access 2.0 for MS Office", False, ""

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: dsn
Keywords : APrgDataODBC vb416 VB4WIN kberrmsg
Version : WINDOWS:4.0
Platform : NT Win95 WINDOWS
Issue type : kbprb


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 25, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.