M
Moe.Vafaei
Hi,
I'm getting null reference exception trying to delete a file in sharepoint
library using a datasource and dataconnection inside IP 2007. I removed the
datasource and dataconnection and created them again and the XPath is also
correct, but still getting the error.
I’ve added two Try...Catch blocks to see where the error is happening and
found out it’s happening in second try.
Very appreciate your somments as I'm stuck in completing my project.
Moe
Dim nav As XPathNavigator
Try
nav = Me .DataSources( "UpdateListItemsConfig"
).CreateNavigator()
Catch ex As Exception
Me .CreateNavigator.SelectSingleNode( _
"/my:YRPDutyExceptionForm/my:field38" ,
NamespaceManager).SetValue( "1) " & ex.Message.ToString)
End Try
Try
nav.SelectSingleNode( _
"/UpdateListItemsConfig/SharepointDelete/Batch/Method/Field[@Name='FileRef']"
) _
.SetValue(filename)
Catch ex As Exception
Me .CreateNavigator.SelectSingleNode( _
"/my:YRPDutyExceptionForm/my:field38" ,
NamespaceManager).SetValue( "2) " & ex.Message.ToString)
End Try
DataConnections( "SharePointDelete" ).Execute()
I'm getting null reference exception trying to delete a file in sharepoint
library using a datasource and dataconnection inside IP 2007. I removed the
datasource and dataconnection and created them again and the XPath is also
correct, but still getting the error.
I’ve added two Try...Catch blocks to see where the error is happening and
found out it’s happening in second try.
Very appreciate your somments as I'm stuck in completing my project.
Moe
Dim nav As XPathNavigator
Try
nav = Me .DataSources( "UpdateListItemsConfig"
).CreateNavigator()
Catch ex As Exception
Me .CreateNavigator.SelectSingleNode( _
"/my:YRPDutyExceptionForm/my:field38" ,
NamespaceManager).SetValue( "1) " & ex.Message.ToString)
End Try
Try
nav.SelectSingleNode( _
"/UpdateListItemsConfig/SharepointDelete/Batch/Method/Field[@Name='FileRef']"
) _
.SetValue(filename)
Catch ex As Exception
Me .CreateNavigator.SelectSingleNode( _
"/my:YRPDutyExceptionForm/my:field38" ,
NamespaceManager).SetValue( "2) " & ex.Message.ToString)
End Try
DataConnections( "SharePointDelete" ).Execute()