Hi
Thank you for your patience, this helps me a lot and I’m beginning to
understand how is going
There is something that i don’t understand
Why do you use the expression:
firstName.SetValue(field3.Value)
Regarding to field3.value gives me an error saying .value it is not a member of string
and
MainDataSource.QueryConnection.Execute()
I have one more question and it is the last one :) this is my problem the picture says more then the words.
well as you can see instead having 3 lines with answers of the queries i have only one the last one.
What i want to make is for each line od data on iutput obtain an answer on output(if there is a record on the database )
**i tried to use the same code (adapted) for adding rows programaticly for the second repating table witch is bind to an access database
and this is the code
Public Sub CTRL9_7_Clicked(ByVal
sender As Object,
ByVal e As
ClickedEventArgs)
Dim
xpath1 As String
= "/dfs:myFields/my:field4"
Dim
field As XPathNavigator =
MainDataSource.CreateNavigator().SelectSingleNode(xpath1, NamespaceManager)
Dim
i As Integer
Dim
rows As Integer
'%%%%First Table
rows =
field.ValueAsInt
i = 0
For
i = 0 To rows - 1
Dim
myNamespace As String
= NamespaceManager.LookupNamespace("my")
Using
writer As XmlWriter =
MainDataSource.CreateNavigator().SelectSingleNode( _
"/dfs:myFields/my:group1",
NamespaceManager).AppendChild()
writer.WriteStartElement("group2", myNamespace)
writer.WriteElementString("field1", myNamespace, "")
writer.WriteElementString("field2", myNamespace, "")
writer.WriteElementString("field3", myNamespace, "")
writer.WriteEndElement()
writer.Close()
End
Using
‘%%%Second Table
Dim
myNamespace1 As String
= NamespaceManager.LookupNamespace("d:")
Using
writer As XmlWriter =
MainDataSource.CreateNavigator().SelectSingleNode( _
"/dfs:myFields/dfs:dataFields",
NamespaceManager).AppendChild()
writer.WriteStartElement("MVKE", myNamespace1)
writer.WriteElementString("MATNR", myNamespace1, "")
writer.WriteElementString("VKORG", myNamespace1, "")
writer.WriteElementString("VTWEG", myNamespace1, "")
writer.WriteEndElement()
writer.Close()
End
Using
Next i
'%%%%%%%%%%%%%End Table %%%%%%%%%%%%%%%%%%%%%
End Sub
Public Sub CTRL11_7_Clicked(ByVal
sender As Object,
ByVal e As
ClickedEventArgs)
'%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Loop
every line %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Dim
domNav As XPathNavigator =
MainDataSource.CreateNavigator()
Dim
rows1 As XPathNodeIterator = domNav.Select( _
"/dfs:myFields/my:group1/my:group2",
NamespaceManager)
While
rows1.MoveNext()
Dim
field1 As String
= rows1.Current.SelectSingleNode( _
"my:field1",
NamespaceManager).Value
'set
the query fields
Dim
xpath2 As String
= "/dfs:myFields/dfs:queryFields/q:MVKE/@MATNR"
Dim
matnr As XPathNavigator =
MainDataSource.CreateNavigator().SelectSingleNode(xpath2, NamespaceManager)
matnr.SetValue(field1)
Dim
field2 As String
= rows1.Current.SelectSingleNode( _
"my:field2",
NamespaceManager).Value
xpath2 = "/dfs:myFields/dfs:queryFields/q:MVKE/@VKORG"
Dim
vkorg As XPathNavigator =
MainDataSource.CreateNavigator().SelectSingleNode(xpath2, NamespaceManager)
vkorg.SetValue(field2)
Dim
field3 As String
= rows1.Current.SelectSingleNode( _
"my:field3",
NamespaceManager).Value
xpath2 = "/dfs:myFields/dfs:queryFields/q:MVKE/@VTWEG"
Dim
vtweg As XPathNavigator =
MainDataSource.CreateNavigator().SelectSingleNode(xpath2, NamespaceManager)
vtweg.SetValue(field3)
'get
the data connection and execute
MainDataSource.QueryConnection.Execute()
End
While
''%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%End
loop every line %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
End Sub
Thanks in advance !