Hello,
I have created a new configuartion using the DBXL Admin Tool. After publishing my solution I noticed that even though I am not getting any shredding errors, my data is not writing to the data tables assoicated with the main connection, Can anyone direct me in where I have made a mistake or what I might be missing. I am using the code below to submit my form to DBXL (see below). Am I missing something in my routine? Do I need to issue a thisXDocument.Submit to comitt my data to the database tables?
Private
Function SubmitDocumentToDBXL() As Boolean
Dim dataConnectionName, docTypeName, xmlToSubmit, docID As StringDim submitDocumenttoDBXLDOM As Microsoft.Office.Interop.InfoPath.SemiTrust.IXMLDOMDocument2
dataConnectionName = GetNodeValue(GetNode(formLogicDom,
"/FormLogic/DBXL/DataConnectionName"), "")docTypeName = GetNodeValue(GetNode(formLogicDom, "/FormLogic/DBXL/Doctype"), "")
xmlToSubmit = thisXDocument.DOM.xml
If (dataConnectionName.Length = 0 Or docTypeName.Length = 0) Then
Return False
End If
submitDocumenttoDBXLDOM = GetDom(dataConnectionName, dbxlFormNameSpaces)
SetNodeValue(GetNode(submitDocumenttoDBXLDOM, "/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:docTypeName"), docTypeName)
SetNodeValue(GetNode(submitDocumenttoDBXLDOM,
"/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:xml"), xmlToSubmit)
Dim name, author, description As Stringname = String.Format("{0} {1}", thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:FastTrak/@StayID").text, "Screen")
author = thisXDocument.DOM.selectSingleNode(
"/dfs:myFields/dfs:dataFields/d:FastTrak/@ScreenedBy").textdescription = String.Format("{0} {1} {2}", thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:FastTrak/@StayID").text, "Screen", thisXDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:FastTrak/@Contact").text)
SetNodeValue(GetNode(submitDocumenttoDBXLDOM,
"/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:name"), name)SetNodeValue(GetNode(submitDocumenttoDBXLDOM, "/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:author"), author)
SetNodeValue(GetNode(submitDocumenttoDBXLDOM,
"/dfs:myFields/dfs:queryFields/tns:SubmitDocument/tns:description"), description)Dim WebServiceAdapter As WebServiceAdapter2
Try
WebServiceAdapter = thisXDocument.DataAdapters(dataConnectionName)
WebServiceAdapter.Query()
docID = GetNodeValue(GetNode(submitDocumenttoDBXLDOM, "/dfs:myFields/dfs:dataFields/tns:SubmitDocumentResponse/tns:docId"), "0")
SetNodeValue(GetNode(formLogicDom,
"/FormLogic/DBXL/DocId"), docID)Catch ex As Exception
Dim CouldNotSubmitToDBXLError As StringCouldNotSubmitToDBXLError = GetNodeValue(GetNode(formLogicDom, "/FormLogic/DBXL/CouldNotSubmitError"), "")
MsgBox(CouldNotSubmitToDBXLError & vbCrLf & ex.Message)
Return False
End Try
Return True
End Function
William L Fringer
Database Administrator/Systems Integration Specialist
L&S Associates, A Human Arc Company
Phone: 800.766.6185, x6605| Fax: 800.698.2877
3245 Technology Blvd | Lansing, MI 48910
[email protected] | www.lsaservices.com