BUG: AppWizard May Fail Using Text Database as Data Source |
Q111813
The information in this article applies to:
- The AppWizard, included with:
- Microsoft Visual C++, version 1.5
SYMPTOMS
When using AppWizard to generate a database application that uses a text file as its ODBC (Open Database Connectivity) data source, AppWizard may fail with the error message "SQLColumns failed." AppWizard may then hang Windows, requiring a reboot, or cause a general protection (GP) fault.
CAUSE
When AppWizard queries for a filename, it incorrectly uses the dot (".") in the filename as a separator between the table owner and the table name. For example, if the file DATASRC.CSV is specified as the initial table, AppWizard will look for a table called CSV, which does not exist.
The SQLColumns call is failing because AppWizard is passing an invalid table name.
Why is AppWizard incorrectly handling the table name only when using the text ODBC driver? The text ODBC driver accepts text filenames with different extensions for each table. The text ODBC driver, therefore, reports the full filenames for table names. This is in conflict with the ODBC SQL specification, which defines the "." as the table-owner name/table- identifier separator. Other ODBC drivers typically have a very specific filename extension and do not return table names with filename extensions, and therefore there isn't a problem with AppWizard incorrectly handling the table name.
RESOLUTION
Rename the files in the data source directory so that there is no extension in the filename.
For example, the text ODBC driver supports CSV (comma separated value) files. Typically, such a file has a .CSV extension (for example, DATASRC.CSV). As a workaround, the file DATASRC.CSV can be renamed to DATASRC.
STATUS
Microsoft has confirmed this to be a bug in Visual C++ version 1.5. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
This is not a problem in Visual C++ 32-bit edition.
Additional query words: 1.50 App Wizard gpf gp-fault
Keywords : kb16bitonly
Issue type : kbbug
Technology : kbVCsearch kbAudDeveloper kbAppWizard
Last Reviewed: May 8, 2001 |