0

I am currently trying to export data from a excell db to a vb.net and create some for loops so I can generate data from it.

anyway I got the whole thing working apart from I cant get the list box to show all the data in the column instead of just one value.

column1string = ds.Tables("query1").Rows(0).Item(0)
        pupilfore1.Items.Add(column1string)

If I try and change Rows(0) to something like
Rows(0, 100) or Rows(0-100) it just says it can't handle more than one integer

can anyone help with this please?
thanks

2
Contributors
2
Replies
4
Views
9 Years
Discussion Span
Last Post by Mr Brownstone
0

Why dont you just make it a varable and run a loop?

for x = 0 to ds.Tables("query1").Rows.count-1
column1string = ds.Tables("query1").Rows(x).Item(0)
pupilfore1.Items.Add(column1string)
next


not sure of the
"ds.Tables("query1").Rows.count-1"
you might use length.

0

thanks I sorted it, I did the following

For Count = 1 To 267
            column1string = ds.Tables("query1").Rows(Count).Item(0)
            pupilfore1.Items.Add(column1string)
        Next
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.