Knowledgebase
[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 QODBC

Problem Description

     I 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 VB Demo and put the same SQL statement in, it returns data just fine. I installed QB, then the QODBC drivers then had to do a repair on QB.

    Below is some error information from the qodbctra.txt file:

ISAMGetData
0x005A3268 [ISAM]
0x09141968 [Account]
COLUMN: 7 (Pass Through)
OFFSET: 0 RawXML: FALSE
ForceUnoptimized: FALSE
DoNotMoveToCache: FALSE
UpdateOptimized: FALSE
SQL_C_SHORT
-13108
MAX LENGTH: 2
LENGTH RETURNED: 2
ERR_NOTCAPABLE S1C00 IM001 [QODBC] Driver not capable
ISAMGetErrorMessage
0x005A3268 [ISAM]
S1C00 IM001 [QODBC] Driver not capable
ISAMCloseTable
0x005A3268 [ISAM]
0x09141968 [Account]
NO_ISAM_ERR 00000 00000

     After further checking, the VENDOR table has columns that are Boolean/Bit/YesNo fields (IsActive) and 'select * from Vendor' gives the same results.

Solution

     The 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 is 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 as 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 seems to handle the Boolean issue just fine.

(403 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please complete the captcha below (we use this to prevent automated submissions).