Hi,
I am trying to set the value of a secondary datasource field using this code:
Dim
emp_name = thisXDocument.GetDOM("TBL_EMPLOYEE").selectSingleNode("//dfs:myFields/dfs:dataFields/d:TBL_EMPLOYEE/@EMPLOYEE_NAME")
I understand I need to define the namespace for the secondary datasource for this to work, but I can't find any examples for Visual Basic. I am getting the typical error about dfs not being defined. Can someone assist with the proper code for VB in this situation?
I see this code already in my form but I think it is referring to the Main Connection.
' The namespace prefixes defined in this attribute must remain synchronized with
' those in the form definition file (.xsf).
<InfoPathNamespace("xmlns:xsf=""http://schemas.microsoft.com/office/infopath/2003/solutionDefinition"" xmlns:msxsl=""urn:schemas-microsoft-com:xslt"" xmlns:xd=""http://schemas.microsoft.com/office/infopath/2003"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xdUtil=""http://schemas.microsoft.com/office/infopath/2003/xslt/Util"" xmlns:xdXDocument=""http://schemas.microsoft.com/office/infopath/2003/xslt/xDocument"" xmlns:xdMath=""http://schemas.microsoft.com/office/infopath/2003/slt/Math"" xmlns:xdDate=""http://schemas.microsoft.com/office/infopath/2003/xslt/Date"" 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/myXS/2009-05-20T22:00:01""")> _
Many thanks for any help,
Andrew