Member Login

Username
Password
Forget Password
New Sign Up
Search Forum

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

Forum : Running another query in the same macro generates runtime error.Search Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC v8 Forum

 New Topic 
 
 Post Reply 
[1]  
 Running another query in the same macro generates runtime error. 
 Author   Message 
  kanes 
  
 Group: Members 
 Posts: 15 
 Joined: 2008-04-15 
 Profile
 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. 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2008-05-14 07:25:05
TimeCreated is a timestamp, not a date. See: How are dates formatted in SQL queries when using the QuickBooks generated time stamps? for more. 

  Top 
  kanes 
  
 Group: Members 
 Posts: 15 
 Joined: 2008-04-15 
 Profile
 Posted : 2008-05-14 21:18:11
Great, worked out just fine! 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to