I posted this question on the MYOB support forums and their support team responded to say that I'd be better contacting someone familiar with SQL server.
I am trying to get data from our MYOB file into SQL server. I have found the below code however it won't retrieve any data (I think I need to enter username and password as parameters but I'm not sure how).
Following is my code (with the company file information removed)
Declare @Object as Int;
Declare @ResponseText as Varchar(8000);
Exec sp_OACreate 'MSXML2.XMLHTTP'
, @Object OUT;
Exec sp_OAMethod @Object
, 'open'
, NULL
, 'get'
, 'http://localhost:8080/AccountRight/fccce.....6e/GeneralLedger/TaxCode/?api-version=v2'
, 'false'
Exec sp_OAMethod @Object
, 'send'
Exec sp_OAMethod @Object
, 'responseText'
, @ResponseText OUTPUT
Select @ResponseText
Exec sp_OADestroy @Object
Can anyone assist me with this?
Thank you.