[QODBC-Desktop] Error: 'Capability not supported' in Delphi with QODBC
Posted by Juliet (QODBC Support) on 27 December 2010 08:03 AM
|
|
Error: 'Capability not supported' in Delphi with QODBCProblem DescriptionI am using Delphi to access the QODBC driver. Simple test program. Have a query, data source, and grid on a form. Database Name in the Query properties is set to QuickBooks Data. Some things work fine; some do not. For example... 'Select * from Transaction' works just fine, but 'select * from Account' returns the error: 'Capability not supported. [QODBC] Driver not capable.' But when I run the QODBC Support Wizard and put the same SQL statement in, it returns data just fine. I installed QB, then the QODBC drivers then I had to repair QB. Below is some error information from the qodbctra.txt file: ISAMGetData After further checking, the VENDOR table has columns that are Boolean/Bit/YesNo fields (IsActive), and 'select * from Vendor' gives the same results. SolutionThe issue is that the driver is having problems with the data type SQL_C_SHORT. I am not sure why Delphi wants Booleans returned as SQL_C_SHORT. Considering how many copies of QODBC are out there, this does not come up. Try the query below: SELECT ListID, {fn CONVERT("IsActive", SQL_INTEGER)} AS "IsActive" FROM Customer The select statement did work, and Delphi does want the Booleans as SQL_C_SHORT. The problem was with the BDE. Note: If testing with a simple BDE TQuery with the database name set to 'QUICKBOOKS DATA,.' Along with the error above, you could always get a pop-up for the login info. So an option is to switch to using an ADOConnection and an ADOQuery with the connection string set to: Provider=MSDASQL.1;Persist Security Info=False;Data Source=QuickBooks Data; That could get rid of the pop-up, AND it handles the Boolean issue just fine. | |
|