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
|
|
Running another query in the same macro generates runtime error. |
Author |
Message |
|
Posted : 2008-05-14 00:17:33 |
Hi,
I am running following query in a macro (which is the third query of total four) generating Runtime Error stating "ODBC driver does not support the requested properties."
'-------------------------------------------------------------------------------------------------------------------------- sConnectString = "DSN=Quickbooks Data;OLE DB Services=-2;" DateFrom = format(Sheets("User").Range("I18").Value, "yyyy-mm-dd") sSQL = "SELECT InvoiceLine.TxnDate, InvoiceLine.InvoiceLineItemRefFullName, InvoiceLine.InvoiceLineQuantity FROM InvoiceLine InvoiceLine WHERE (InvoiceLine.TimeCreated>={d '" & DateFrom & "'}) ORDER BY InvoiceLine.TxnDate" Set oConnection = New ADODB.Connection Set oRecordset = New ADODB.Recordset oConnection.Open sConnectString oRecordset.Open sSQL, oConnection, adOpenStatic, adLockOptimistic '<<< Error Generated oRecordset.Close Set oRecordset = Nothing oConnection.Close Set oConnection = Nothing '--------------------------------------------------------------------------------------------------------------------------
This is an edited version of the first two working queries.
Thanks. |
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-05-14 07:25:05 |
|
|
|
|
Posted : 2008-05-14 21:18:11 |
Great, worked out just fine! |
|
|
|
|