SYMPTOMS
When using table names qualified with the current qualifier and using
identifier quote character to enclose the current qualifier and the table
name, you receive a syntax error. This happens with dBASE, Paradox,
Microsoft FoxPro, Btrieve, Microsoft Excel, and Text Open Database
Connectivity (ODBC) drivers. It does NOT happen with the Microsoft Access
driver.
For example, in case of dBase driver, if the values returned by
SQLGetConnectOption and SQLGetInfo are as shown:
SQLGetConnectOption(hdbc,SQL_CURRENT_QUALIFIER,pvParam)
Returns "C:\Database"
SQLGetInfo(hdbc, SQL_IDENTIFIER_QUOTE_CHAR, rgbInfoValue,cbInfoValueMax)
Returns "`"
SQLGetInfo(hdbc, SQL_QUALIFIER_NAME_SEPARATOR,rgbInfoValue,cbInfoValueMax)
Returns "\"
Then you let a table called testtable exist in the data source. The queries
of the form below will receive syntax error SQLState=37000, szErrorMsg=,
Syntax error in FROM clause
when executed using SQLExecDirect or SQLExecute calls.
Select * from 'C:\Database'\'testtable'
delete from 'C:\Database'\'testtable'
Update 'C:\Database'\'testtable' set <colname>=<new value>
If you do not use the quote character around the qualifier and the table,
these queries work fine.