This is in VB script it should be very easy to get code like it working in vb.net.
'Set the namespace
XDocument.DataObjects("GetPart").DOM.setProperty("SelectionNamespaces", "xmlns:ns3=""http://www.blah.com/Parts"" xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution""")
'set the parameter
XDocument.DataObjects("GetPart").DOM.selectSingleNode("/dfs:myFields/dfs:queryFields/ns3:GetPartsByNumber/ns3:sPartNumber").text = sSearchText
'run query
XDocument.DataObjects("GetPart").Query()
Jason
http://www.k2distillery.com/