There is a good demo about namespacesDefinition post by jesse in the
article:
http://www.infopathdev.com/forums/topic.asp?TOPIC_ID=4420㐨
Sorry, are you using VBScript? rather than VB.NET?
If you are using VBScript, please add the following code:
'<namespacesDefinition>
XDocument.DOM.setProperty "SelectionNamespaces",
"xmlns:q=""
http://schemas.microsoft.com/office/infopath/2003/ado/queryFields""
xmlns:d=""
http://schemas.microsoft.com/office/infopath/2003/ado/dataFields""
xmlns:dfs=""
http://schemas.microsoft.com/office/infopath/2003/dataFormSolution""
xmlns:my=""
http://schemas.microsoft.com/office/infopath/2003/myXSD/2007-03-10T15:43:11""
xmlns:xdado=""
http://schemas.microsoft.com/office/infopath/2003/adomapping"""
'<namespacesDefinition>
Please replace the declaration xmlns:my with your namespace uri or
remove
it.
The code should be generated by InfoPath 2007 automatically...
Please reference the article
http://www.officehelp.in/98655/dataconnection-data
Thank you so much for your response. I'm sorry - I'm VERY new to
Infopath
(about two weeks) but where is my formcode.vb? And where is the
header?
Thank you for your patience.
:
Please check the <InfoPathNamespace(" ... ")> section in the header
of
your
FormCode.vb, and ensure the presence of the following xmlns
declarations:
xmlns:q=""
http://schemas.microsoft.com/office/infopath/2003/ado/queryFields""
xmlns:d=""
http://schemas.microsoft.com/office/infopath/2003/ado/dataFields""
xmlns:dfs=""
http://schemas.microsoft.com/office/infopath/2003/dataFormSolution""
InfoJet Serivce,
InfoPath Web Form,
[
http://www.infojetsoft.com]
Hello, Could someone tell me what's wrong with this code? I
can't see
that
there is anything wrong.
Sub XDocument_OnLoad(eventObj)
Set objNet = CreateObject("WScript.NetWork")
Dim strInfo
strInfo = objNet.UserName
Dim strOrigSQLCommand
Dim strTitle
Dim strSQLCommand
Dim strSupplierID
Dim querySuppliers
strOrigSQLCommand=XDocument.QueryAdapter.Command
set
querySuppliers=XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/q:Suppliers")
'MsgBox strOrigSQLCommand
'MsgBox strInfo
End Su