I found the solution to the above problem. After running the above sample code, I opened the test company in the Sage 50 application. After I opened the company, I was presented with a dialog box in the Sage 50 application. The dialog asked me if I want to allow my test application to access the company. I chose the option "Always" That resolved the above isse.
↧