Hi there,
I have some code which updates a xml file with the values entered into my form, and then shot over to a custom sharepoint list. the problem is i keep getting a "NullReferenceException was unhandled by user code" error. when i debug it, it tells me "Object reference not set to an instance of an object." but the weird thing is, it only happens with my time imput, my date seems to update the list just fine. here is my code...
the debug error occurs on the "Dim todaystime As String...." line, also i have tried changing innerxml to value, but it did not work.
Dim root As XPathNavigator = MainDataSource.CreateNavigator()
Dim todaysdate As String = root.SelectSingleNode("my:myFields/my:Date", NamespaceManager).ValueDim todaystime As String = root.SelectSingleNode("my:myFields/my:Time", NamespaceManager).InnerXml
Dim batch As XPathNavigator = DataSources("AddListItem").CreateNavigator()batch.SelectSingleNode("/Batch/Method/Field[@Name='Date']", NamespaceManager).SetValue(todaysdate)
batch.SelectSingleNode(
"/Batch/Method/Field[@Name='Time']", NamespaceManager).SetValue(todaystime)
DataConnections(
"WebServiceSubmit").Execute()