BUG: Access Driver DBQ=, DefaultDir= Incorrect with Large mdb (153850)



The information in this article applies to:

  • Microsoft Open Database Connectivity

This article was previously published under Q153850

SUMMARY

If the path to an mdb file is over 85 bytes, then after a SQLDriverConnect call, the ends of the DBQ= and DefaultDir= strings in the szConnStrOut parameter will be overwritten.

MORE INFORMATION

If you have an mdb file in a deeply nested directory whose path exceeds 85 bytes, such as the following:

c:\nested01\nested02\nested03\nested04\nested05\nested06\nested07\nested 08\nested09\general.mdb

and if you create a data source on it, then, after a SQLDriverConnect using that data source, the szConnStrOut variable will have two problems:
  1. The end of the DBQ= string will be overlaid with the literal DBQ.
  2. The end of the DefaultDir= string will be overlaid with the literal DefaultDir

STATUS

Microsoft has confirmed this to be a problem in the ODBC Access 3.40.2505 driver. Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

To work around this problem, move the mdb file to a directory that has a shorter path name.

Modification Type:MajorLast Reviewed:12/2/2002
Keywords:kbBug KB153850 kbAudDeveloper