Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

(2008)Adding multiple fields with datareader in ListviewItems

Status
Not open for further replies.

RadjeshNL

Technical User
Sep 1, 2008
32
NL
Hi,

I'm trying to read and add a few fields from the .mdb into 1 single ListViewItem.

Partial code:

Code:
Dim new_item As New ListViewItem(data_reader.Item("Field1").ToString)
    Listview(data_reader.Item("Field2").ToString)
    Listview(data_reader.Item("Field3").ToString)
    Listview(data_reader.Item("Field4").ToString)
Listview1.Items.Add(new_item)

Everything works fine. But now I want Field2, Field3 and Field4 in Field2. So I tried several options like:

Code:
Listview(data_reader.Item("Field2") & ("Field3") & ("Field4").ToString)

Nothing seems to work. Could someone help me out?

Thanks in advance.
 
Try this:

Listview(data_reader.Item("Field2").ToString & data_reader.Item("Field3").ToString & data_reader.Item("Field4").ToString)



I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson

Arrrr, mateys! Ye needs ta be preparin' yerselves fer Talk Like a Pirate Day!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top