Help converting VB to FWH
Posted: Thu Jul 19, 2007 7:49 pm
Hello,
Can anyone help me convert the following VB code to FWH? I would appreciate the help.
Dim qbXMLRP As New QBXMLRP2Lib.RequestProcessor2
Dim ticket As String
qbXMLRP.OpenConnection cAppID, cAppName
ticket = qbXMLRP.BeginSession("", QBXMLRP2Lib.qbFileOpenDoNotCare)
Dim builder As New DOMDocument40
Dim QBXML As IXMLDOMNode
Set QBXML = builder.createElement("QBXML")
builder.appendChild QBXML
Dim msgsRq As IXMLDOMElement
Set msgsRq = QBXML.appendChild(builder.createElement("QBXMLMsgsRq"))
msgsRq.setAttribute "onError", "continueOnError"
Dim CustomerAddRq As IXMLDOMElement
Dim CustomerAdd As IXMLDOMElement
Set CustomerAddRq = msgsRq.appendChild(builder.createElement("CustomerAddRq"))
Set CustomerAdd = CustomerAddRq.appendChild(builder.createElement("CustomerAdd"))
Dim dataElement As IXMLDOMElement
Set dataElement = CustomerAdd.appendChild(builder.createElement("Name"))
dataElement.appendChild builder.createTextNode(custName)
Dim supportedVersion As String
supportedVersion = qbXMLLatestVersion(qbXMLRP, ticket)
requestXML = qbXMLAddProlog(supportedVersion, builder.xml)
responseXML = qbXMLRP.ProcessRequest(ticket, requestXML)
qbXMLRP.EndSession ticket
qbXMLRP.CloseConnection
Can anyone help me convert the following VB code to FWH? I would appreciate the help.
Dim qbXMLRP As New QBXMLRP2Lib.RequestProcessor2
Dim ticket As String
qbXMLRP.OpenConnection cAppID, cAppName
ticket = qbXMLRP.BeginSession("", QBXMLRP2Lib.qbFileOpenDoNotCare)
Dim builder As New DOMDocument40
Dim QBXML As IXMLDOMNode
Set QBXML = builder.createElement("QBXML")
builder.appendChild QBXML
Dim msgsRq As IXMLDOMElement
Set msgsRq = QBXML.appendChild(builder.createElement("QBXMLMsgsRq"))
msgsRq.setAttribute "onError", "continueOnError"
Dim CustomerAddRq As IXMLDOMElement
Dim CustomerAdd As IXMLDOMElement
Set CustomerAddRq = msgsRq.appendChild(builder.createElement("CustomerAddRq"))
Set CustomerAdd = CustomerAddRq.appendChild(builder.createElement("CustomerAdd"))
Dim dataElement As IXMLDOMElement
Set dataElement = CustomerAdd.appendChild(builder.createElement("Name"))
dataElement.appendChild builder.createTextNode(custName)
Dim supportedVersion As String
supportedVersion = qbXMLLatestVersion(qbXMLRP, ticket)
requestXML = qbXMLAddProlog(supportedVersion, builder.xml)
responseXML = qbXMLRP.ProcessRequest(ticket, requestXML)
qbXMLRP.EndSession ticket
qbXMLRP.CloseConnection