Question

I've been trying to find a way to connect my Windev application using the Quickbooks SDK. I wish to connect to my local QB instance using the qbXML API. I've been able to get a reference to the library using :

myconnection = new object Automation "QBXMLRP2.RequestProcessor"

However, when it comes to the OpenConnection2 method, I only get errors. Either "missing parameter" or "invalid parameter". I am aware that I should pass a "localQBD" type to the function, but I have not found out how to reference it. The following represents my invalid script.

myconnection>>OpenConnection2("","My Test App", localQBD)

How can I achieve a connection to QB through Windev?

Was it helpful?

Solution

After much searching, I have found that I was on the right path using the automation variable type. However, I have yet to find how to reference the constants provided by the library. Instead, I declare them beforehand like so

CONSTANT
    omSingleUser = 0
    omMultiUser = 1
    omDontCare = 2

    qbStopOnError = 0
    qbContinueOnError = 1

    ctLocalQBD = 1
    ctLocalQBDLaunchUI = 3
FIN

Which gives us this working example

myconnection = new object Automation "QBXMLRP2.RequestProcessor"
ticket = myconnection>>BeginSession("",::omDontCare)
XMLresponse = myconnection>>ProcessRequest(ticket,XMLrequest)
myconnection>>EndSession(ticket)
myconnection>>CloseConnection()
delete myconnection

A huge thanks goes to Frank Cazabon for showing me the proper constant values.

OTHER TIPS

I have a complete external WinDev component that accesses QB and a helper program that can generate the WinDev calls in the correct order with the correct spelling and provides an OSR for all the QuickBooks fields and modules.

I have a similar product for the Clarion language and am in the final stages of the WinDev version. Contact me if you are interested. qbsnap at wybatap.com

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top