FIX: "Unable to Create File Buffer" 32-Bit ODBC Error (130719)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 2.2
This article was previously published under Q130719 SYMPTOMS
After a long period of successful operation, an application generates the
following ODBC error when that application uses the MFC database classes
such that the 32-bit ODBC cursor library:
General error: Unable to create file buffer
State:S1000,Native:0,Origin:[Microsoft][ODBC Cursor Library]
CAUSE
The ODBC cursor library generates temporary files for its own use. To
ensure that the temporary file names are unique, the 32-bit ODBC cursor
library generates temporary file names that include a hex number. That
number is incremented every time a new filename is generated. Here is
an example of filenames that are genrated by the cursor library for its
temporary files:
CTT1111.TMP
CTT1112.TMP
CTT1113.TMP
When the hex number embedded in the filename wraps from FFFF to 0, the
error is generated:
CTTFFFD.TMP
CTTFFFE.TMP
CTTFFFF.TMP
CTT0.TMP <-- This temporary filename causes the error
RESOLUTION
To avoid the error, create a file named CTT0.TMP, and place it in the
directory that the cursor library uses to generate its temporary files.
Temporary files are created in the current working directory with the
32-bit cursor library. The cursor library will see the existing file with
that name and skip over it to the
next filename (CTT1.TMP).
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products
listed at the beginning of this article. This problem has been corrected in
the ODBC cursor library that ships with Visual C++ 4.0 and 4.1
(ODBCCR32.DLL, version 2.50.3006).
Modification Type: | Major | Last Reviewed: | 12/9/2003 |
---|
Keywords: | kbbug kbDatabase kbfix KB130719 |
---|
|