Hi guys,
its me again :)
Sorry to post quite alot questions here, but unfortunatly the information
source at this moment for Infopath 2007 is a bit low....
Anyway
I do have another nice little problem:
I have a repeating table which is filled throuch a Web Service DB connection
with data.
Now I wanna save back to the database the changes i made for each row.
I wrote VB.NET code which calls my created webservice.
Here is the code:
Public Sub CRTL11_8_Clicked(ByVal sender as Object, ByVal e as
ClickedEventArgs)
Dim wsCon as WebServiceConnection = _
DirectCast(Me.DataConnections("Versenden"), WebServiceConnection)
wsCon.Execute()
End Sub
This code works fine so far but only for the first row.
I do know that I can call each row by using the e Variable.
I tried as well the the expanded version of Execute
like:
wsCon.Execute(xpnInput, xpnOutput, xpnError)
where
Dim xpnInput as XPathNavigator = e.Source.SelectSingleNode(fields,
NamespaceManager)
Dim xpnOutput, xpnError as XPathNavigator = inputDoc.CreateNavigator()
But it does not work.
How can I call the values form each row to pass the values to the parameters
which are necessary to proceed the update command within the SQL Server 2005.
I use InfoPath 2007 with direct connection (Web Service) to the SQL Server
2005
Any help is more then appreciated
Regards
Janko
Janko - 26 Jan 2007 12:51 GMT
Hi Update on my Problem
I wrote the following code:
Public Sub CTRL11_8_Clicked(ByVal sender As Object, ByVal e As
ClickedEventArgs)
Dim wsCon As WebServiceConnection = _
DirectCast(Me.DataConnections("Versenden"),
WebServiceConnection)
Dim inputDoc As XmlDocument = New XmlDocument()
Dim outputDoc As XmlDocument = New XmlDocument()
Dim errorDoc As XmlDocument = New XmlDocument()
Dim fieldsID As String = "ns1:IDT"
Dim xpnInID As XPathNavigator =
e.Source.SelectSingleNode(fieldsID, NamespaceManager)
Dim fieldstxt As String = "ns1:Text"
Dim xpnIntxt As XPathNavigator =
e.Source.SelectSingleNode(fieldstxt, NamespaceManager)
inputDoc.LoadXml("<?xml version=" & """1.0""" & " encoding=" &
"""utf-8""" & _
" ?><myFields><IDT>" & xpnInID.InnerXml &
"</IDT><Text>" & xpnIntxt.InnerXml & _
"</Text></myFields>")
Dim xpnInput As XPathNavigator = inputDoc.CreateNavigator()
Dim xpnOutput As XPathNavigator = outputDoc.CreateNavigator()
Dim xpnError As XPathNavigator = errorDoc.CreateNavigator()
wsCon.Execute(xpnInput, xpnOutput, xpnError)
End Sub
the XPathNavigator xpnInput receives the values from the changed row but i
receive an error when the method execute is getting called with the following
error message:
System.Net.WebException
Exception from HRESULT: 0x8004304D
at
Microsoft.Office.Infopath.Internal.MomExceptionHelper.ExecuteDataConnectionAction(OMCall d)
and so on....
has anyone an idee what am I doing wrong ?
can't see my problem!!!! :(
here is the msdn description from microsoft
http://msdn2.microsoft.com/de-de/library/aa943097(VS.80).aspx
cheers
Janko
> Hi guys,
> its me again :)
[quoted text clipped - 46 lines]
> Regards
> Janko