Code to show the records in textboxes?
Dear Friends,
How can we show the records in the textboxes in VS2008? I used the following code in VB6 to perform this action:
Code:
Public Sub Show_Record()
If Not (rs.BOF Or rs.EOF) = True Then
txtSNO = rs(0) & ""
txtPRN = rs(1) & ""
txtPRL = rs(2) & ""
txtDESC = rs(3) & ""
End If
End Sub
Re: Code to show the records in textboxes?
Use a DataAdapter to populate a DataTable. Bind that Datatable to a BindingSource. Bind that BindingSource to your controls. To navigate, call MoveNext, MovePrevious, etc, on the BindingSource
Re: Code to show the records in textboxes?
Quote:
Originally Posted by
jmcilhinney
Use a DataAdapter to populate a DataTable. Bind that Datatable to a BindingSource. Bind that BindingSource to your controls. To navigate, call MoveNext, MovePrevious, etc, on the BindingSource
Thanks. There is no such code to written. If not, please give me any example on how to use DataAdaptor?
Re: Code to show the records in textboxes?
Follow the Database FAQ link in my signature.
Re: Code to show the records in textboxes?
if you keep going like this(i.e;keep on showing vb6 codes and ask for the corresponding vb.net codes) then things are not going to help you either.All you need is to take your time to read some ebooks along with the articles present on the internet,keep trying out some examples of yourself and i can bet you wont take more than 3 days to learn ado.net :)
if your code does not work then post here your code and we are here to help you out....but frankly speaking showing vb6 codes wont help at all
now its upto you which way to go :thumb: