Article ID: 177947
Article Last Modified on 6/2/2005
APPLIES TO
- Microsoft Data Access Components 2.5, when used with:
- Microsoft Visual C++ 6.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Enterprise Edition
- Microsoft Visual C++ 5.0 Professional Edition
- Microsoft Visual C++ 6.0 Professional Edition
- Microsoft Visual C++ 6.0 Standard Edition
This article was previously published under Q177947
SYMPTOMS
When you use the AppWizard to create a CRecordset class
using the ODBC Text Driver, your project will compile. However, when you try to
open the recordset, you will get the following error message:
Syntax error in FROM clause.
CAUSE
The AppWizard incorrectly parses the table as
[Table].[txt], instead of as [Table#txt].
RESOLUTION
In the CTextDriverSet.cpp implementation file, find the
CTextDriverSet::GetDefaultSQL() function and change the return value from
return _T("[Table].[txt]");
to the following:
return _T("[Table#txt]");
Here is the function before the changes:
CString CTextDriverSet::GetDefaultSQL()
{
return _T("[Table].[txt]");
}
Here is the function after the changes:
CString CTextDriverSet::GetDefaultSQL()
{
return _T("[Table#txt]");
}
STATUS
Microsoft is researching this problem and will post new
information here in the Microsoft Knowledge Base as it becomes available.
Additional query words: Bomb Error
Keywords: kberrmsg kbtshoot kbdatabase kbprb kbmdacnosweep KB177947