VB .net Navigation

whitedust

New member
Joined
Sep 12, 2005
Messages
4
Programming Experience
Beginner
Hi friends,

I am totally new to the world of VB.net. Although I have worked on VB, but i feel VB.net is different than VB. I am working on the database connectivity in VB.net
I want the text of a database field to be displayed in the text box.

I am using the BindingContext concept(only concept learnt so far)..

although the first field is getting displayed in the text box. when i click on next button it does not show me the next record.

coding for next button is

Me.BindingContext(Dataset1,"tablename").Position +=1

I suppose this should work..but it does not

Thanks in advance

White Dust
 
Bind it once to the field.... once.... don't try to reset it, which is what you are doing.

What you need to do is to move the curent position within the Dataset.

DataSet1.Tables("YourTableName").Row += 1

Be sure to check for the end of the DataTable first before incrementing the counter.
(use DataSet1.Tables("YourTableName").Rows.Count for this)

-tg
 
Back
Top