S
swathi
Hi,
I am trying to connect to the db from infopath form through code.I wrote the
following code.
DataSource dscustomer = this.DataSources["CustomerNextNumber"];
XPathNavigator xnCustomer = dsCustomer.CreateNavigator();
XPathNavigator CustID =
xnCustomer.SelectSingleNode("/dfs:myFields/dfs:queryFields/d:CustomerNextNumber/d:CustID", NamespaceManager);
string strCustID = CustID.Value; // Read
CustID.SetValue(strApqpNbr);
At runtime, I am getting the NullReference Exception as follows.
"Object reference not set to an instance of an object"
How to resolve this.
Thanks
I am trying to connect to the db from infopath form through code.I wrote the
following code.
DataSource dscustomer = this.DataSources["CustomerNextNumber"];
XPathNavigator xnCustomer = dsCustomer.CreateNavigator();
XPathNavigator CustID =
xnCustomer.SelectSingleNode("/dfs:myFields/dfs:queryFields/d:CustomerNextNumber/d:CustID", NamespaceManager);
string strCustID = CustID.Value; // Read
CustID.SetValue(strApqpNbr);
At runtime, I am getting the NullReference Exception as follows.
"Object reference not set to an instance of an object"
How to resolve this.
Thanks