dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi to all
i work in a web application
i have a dataset with two data tables i iterate them with for loop
but i get only first row of any tables
what can i do
thanks
 
thanks..
x=number of rows in first table t1
y =number of rows in second tables t2
ds = data set
for i=o to i=x
parentnode=new treenode()
parentnode.text=ds.tables(t1).rows(i).item(0)
tree.nodes.add(parentnode)
for j=0 to j=y
childnode=new treenode()
childnode.text=ds.tables(t2).rows(j).item(0)
tree.nodes(i).nodes.add(childnode)
next
next
 
Is the row count for x any y more than 1 ??

sara said:
thanks..
x=number of rows in first table t1
y =number of rows in second tables t2
ds = data set
for i=o to i=x
parentnode=new treenode()
parentnode.text=ds.tables(t1).rows(i).item(0)
tree.nodes.add(parentnode)
for j=0 to j=y
childnode=new treenode()
childnode.text=ds.tables(t2).rows(j).item(0)
tree.nodes(i).nodes.add(childnode)
next
next
 
can you try this

for i= 0 to x - 1
parentnode=new treenode()
parentnode.text=ds.tables(0).rows(i).item(0)
tree.nodes.add(parentnode)
for j= 0 to y - 1
childnode=new treenode()
childnode.text=ds.tables(1).rows(j).item(0)
tree.nodes(i).nodes.add(childnode)
next
next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top