Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Driver Not Capable error with InvoiceLineSeqNo |
Author |
Message |
JimK |
|
Group | : Members |
Posts | : 34 |
Joined | : 2006-08-08 |
|
Profile |
|
Posted : 2006-11-13 15:25:37 |
Since upgrading to QBE7 and the latest version of QODBC, the following statement doesn't work in VB.NET 2005.
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT TxnID, InvoiceLineSeqNo, InvoiceLineServiceDate, " & _ "InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount " & _ "FROM InvoiceLine WHERE RefNumber IN ('2900')" , cnQODBC)
If I remove the 'InvoiceLineSeqNo' then it works fine. The odd part is that the statement works fine in VBDEMO. The error that is get is 'Driver Not Capable'. The statement worked fine until I upgraded to v7 of QODBC (v6 worked fine).
Any ideas? Thanks. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-11-14 08:47:14 |
As you have already said, I can run:
SELECT TxnID, RefNumber, InvoiceLineSeqNo, InvoiceLineServiceDate, InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount FROM InvoiceLine WHERE RefNumber IN ('10')
without a problem, so it's not the SQL statement. The only other "Driver not capable" error was caused using the REMOTE CONNECTOR with QODBC v7. The user changed their connection method to use the QODBC DCOMs instead and the error went away. |
|
|
|
JimK |
|
Group | : Members |
Posts | : 34 |
Joined | : 2006-08-08 |
|
Profile |
|
Posted : 2006-11-14 11:20:55 |
Tom, I saw your reply and I must be missing something. I have QBE v7 with QODBC v7 (.199), not QODBC server edition. I'm not sure how you want me to switch to DCOM instead of the Remote Connector. I am testing the new version of QBE along with QODBC before installing it on our server (Windows SBS). I also did not see the post about QODBC v7 causing an error until the user switched to DCOM. Thanks for your help. |
|
|
|
JimK |
|
Group | : Members |
Posts | : 34 |
Joined | : 2006-08-08 |
|
Profile |
|
Posted : 2006-11-16 18:44:55 |
Tom, I know you're busy answering many many questions but if I can't get this resolved than I cannot upgrade to QBE v7 and QODBC v7. Please work with me to find a solution. Thanks a lot! |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-11-16 20:53:02 |
What happens if you call the QODBC Optimizer directly:-
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT TxnID, InvoiceLineSeqNo, InvoiceLineServiceDate, " & _ "InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount " & _ "FROM InvoiceLine NOSYNC WHERE RefNumber IN ('2900')" , cnQODBC)
or if you get all the columns?:-
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT * FROM InvoiceLine NOSYNC WHERE RefNumber IN ('2900')" , cnQODBC) |
|
|
|
JimK |
|
Group | : Members |
Posts | : 34 |
Joined | : 2006-08-08 |
|
Profile |
|
Posted : 2006-11-18 08:08:39 |
Tom, with the NOSYNC clause I get the same error (whether I specify the columns or '*'). What's your next suggestion? Thanks. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-11-18 10:14:14 |
Because you say you only have the problem when you use the InvoiceSeqNo, let's try typing it to an integer or try one of the other data types:
daQODBC = New System.Data.Odbc.OdbcDataAdapter("SELECT TxnID, {fn CONVERT(InvoiceLineSeqNo, SQL_INTEGER)} as LineNo, InvoiceLineServiceDate, " & _ "InvoiceLineItemRefFullName, InvoiceLineDesc, InvoiceLineQuantity, InvoiceLineRate, InvoiceLineAmount " & _ "FROM InvoiceLine NOSYNC WHERE RefNumber IN ('2900')" , cnQODBC)
CONVERT(value_exp, data_type) - The function returns the value specified by value_exp converted to the specified data_type, where data_type is one of the following keywords:
SQL_BIGINT, SQL_BINARY, SQL_BIT, SQL_CHAR, SQL_DATE, SQL_DECIMAL, SQL_DOUBLE, SQL_FLOAT, SQL_INTEGER, SQL_LONGVARBINARY, SQL_LONGVARCHAR, SQL_NUMERIC, SQL_REAL, SQL_SMALLINT, SQL_TIME, SQL_TIMESTAMP, SQL_TINYINT, SQL_TYPE_DATE, SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP, SQL_VARBINARY, SQL_VARCHAR |
|
|
|
JimK |
|
Group | : Members |
Posts | : 34 |
Joined | : 2006-08-08 |
|
Profile |
|
Posted : 2006-11-20 17:22:12 |
Tom, funny you should suggest the type conversion. I had the same thought over the weekend but I'm not well versed in the CONVERT function for SQL. I plugged it in per your suggestion and it worked perfectly. I don't know what that tells us but at this point I don't care because I can upgrade! I will tell you though that the SQL statement worked just fine in Excel 2003 so it seems to be limited to VB.NET. As always you have solved the problem (or at least provided a more than suitable workaround). You've never failed me and I appreciate it very much. Thank you! |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2006-12-20 10:17:52 |
This problem turns out to have been caused by SQL_SLONG types. In QODBC v7.00.00.204 we have added conversion support for SQL_C_SLONG, SQL_C_ULONG, and SQL_C_SSHORT. See: QODBC v7.0.0.204 Released for more. |
|
|
|
|