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 : Print problems in AccessSearch Forum

Forum Home > QODBC - ODBC Driver for QuickBooks > QODBC SQL Sample Scripts Forum

 New Topic 
 
 Post Reply 
[1]  
 Print problems in Access 
 Author   Message 
  Anders Jeppesen 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-07-17 
 Profile
 Posted : 2006-08-10 19:29:08

Hi,

I have made this sample, it's finding a match from another system to QuickBook, and I need to get the ListId, but when I make a debug.print, when I get a runtime error 3001.

Isen't it possible to make a loop where I get the listId?

SAMPLE:

Function test2()

Set myQBConn = CreateObject("ADODB.Connection")
Set myQBRecordset = CreateObject("ADODB.Recordset")
myQBConn.Open = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=QuickBooks Data;OLE DB Services=-2;"

Dim vDB As DAO.Database
Dim RS As DAO.Recordset

Set vDB = CurrentDb
vSQL = "SELECT Import_BCN.Customer_Name FROM Import_BCN GROUP BY Import_BCN.Customer_Name"
Set RS = vDB.OpenRecordset(vSQL)

With RS
    Do Until .EOF
        Debug.Print .Fields(0)
        ' Find ID fra QuickBooks
        vCustomer = "Select ListId, FullName from Customer where FullName like '" & .Fields(0) & "%'"
        myQBConn.Execute vCustomer
        Debug.Print myQBConn.ListId
    .MoveNext
    Loop
    .Close
End With

End Function

 

  Top 
  Anders Jeppesen 
  
 Group: Members 
 Posts: 4 
 Joined: 2006-07-17 
 Profile
 Posted : 2006-08-10 23:22:30

Hi,

I found out of the problem, had fogotten to make some datasets etc.....

 

  Top 
  Tom 
  6c3c1_sdk-qodbc.gif
 Group: Administrator 
 Posts: 5510 
 Joined: 2006-02-17 
 Profile
 Posted : 2006-08-11 08:31:59
The Execute command is used to do INSERTs, UPDATEs and DELETEs. As you've already said, you had to create a second recordset to return the ListID values from QuickBooks. 

  Top 
 New Topic 
 
 Post Reply 
[1]  

Jump to