Hi John,

Thank you again for your offer to help!

I finally have time to formulate my questions for you. I wanted to put together the info below to be efficient with your time. I'm glad that you migrated from Myle's plugin, because it will help you understand where I am currently at, as well as what modifications need to be made. I understand that it is not always easy to revisit code that you have not looked at in a while. Thank you again for offering to do so.

With Myles' plugin, I made sure the QB application was being run from the same machine as a 4D Client.

Each time my 4D Application made a call to QB, it always followed this 8 step approach:

---------------------------------------------------

1. Open a connection by calling qb_OpenConnection:

$ret:=qb_OpenConnection ("";"";QB_LogInCode)

I check to make sure that $ret=0 (no errors)

Note: the 3rd parameter is the login password that QB expects from my 4D application

---------------------------------------------------

2. Open a ticket to a new QB session by calling qb_BeginSession:

$ret:=qb_BeginSession ("";2;vt_Ticket)

I check to make sure that $ret=0 (no errors)

Note: The vt_Ticket parameter is set by QB

---------------------------------------------------

3. I build the QBXML request in a Blob variable called "BLOB_XML_ToSend"

---------------------------------------------------

4. Process the request & receive the returned XML:

Using the ticket I received in step #2, I send the Blob I built in step #3, and capture the returned value in a Blob called BLOB_XML_Returned

$ret:=qb_ProcessRequest (vt_Ticket;BLOB_XML_ToSend;BLOB_XML_Returned)

I check to make sure that $ret=0 (no errors)

---------------------------------------------------

5. I process the returned data in the Blob variable "BLOB_XML_Returned" for SAX Compliance

---------------------------------------------------

6. Parse the Returned Results in "BLOB_XML_Returned" and save the data to the appropriate tables/fields

---------------------------------------------------

7. End the session

$ret:=qb_EndSession ($vt_Ticket)

I check to make sure that $ret=0 (no errors)

---------------------------------------------------

8. Close the connection

$ret:=qb_CloseConnection

I check to make sure that $ret=0 (no errors)

---------------------------------------------------




Two questions:

1. What is QB RDS client and server? Are these apps that need to be installed on the client workstation and server?

2. Can you let me know how/if the approach I'm using above with Myle's plugin relates in any way to how you are using PowerShell?


Thank you again,
Ken








On 12/13/19 8:04 PM, JOHN BAUGHMAN via 4D_Tech wrote:
Ken,

        I have a deployed 4D database talking to QB on Windows 10 and 4D17r5. 
It started  out using Myles’ plug in. For me I had to stop using the plug in 
when the client moved to Windows 7.

        I was able to get it done using…

         QB RDS client and server: Client or Client/Server needed or not at all 
depending on where Quickbooks is located on the network in relation to the 
requesting 4D Client or requesting 4D Server.

        Windows PowerShell: 4D creates the QB request with the help of Myles’ 
XML methods. It then packs it into a PowerShelll script. The script is saved to 
a script fil. Launch External Process is used to launch PowerShell to read the 
script file. PowerSell creates the QBXMLRP com object and sends the request. 
The response is written out to as file on the hard drive which is read by 4D.

        This has worked quite well over the years. When the client moved to 
Windows 10 I needed to do a bit of massaging but got it to work.

        Each time I revisit this project, it takes me a while to get my head 
around it all, but if you have any questions feel free to contact me off line. 
I will do my best… I am a MAC guy so my brain really needs a refresher each 
time I have to deal with Windows.

John

On Dec 13, 2019, at 9:47 AM, Ken Eyring via 4D_Tech <4d_tech@lists.4d.com> 
wrote:

I have been using QBManager from Myles Wakeham up until now with version 15.4, 
but it will not work with v17.

I found this link (https://github.com/miyako/4d-tips-quickbook-integration) 
from the post (below) from Miyako in 2017 regarding integration to QuickBooks.

I've downloaded the database, but the code does not look familiar to QBManager 
in any way.

I'm not sure how to use Miyako's plugin to open a connection to QuickBooks and 
then subsequently send and retrieve data and then close the connection.

The QBManager plugin uses QBXML to do all of this.  I'm wondering if I need to 
re-write all of the code to use Miyako's plugin, or if some/most of it can be 
reused.

Is there any documentation or examples for Miyako's plugin that anyone is aware 
of and would be willing to share?

Thank you,
Ken Eyring





On 09/05/17 20:26 PM, Keisuke Miyako via 4D_Tech wrote:
you could start from here:
https://github.com/miyako/4d-tips-quickbook-integration
2017/09/06 8:18、Douglas von Roeder via 4D_Tech <4d_tech@lists.4d.com> のメール:
What's the best approach to take for that.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to