Help with search button

RPBLEA

Active member
Joined
Apr 26, 2005
Messages
36
Programming Experience
1-3
I'm writing some code in Vb.net I'm using aspx and I have a button the webpage called next and back, How Do I search through the database, I haven't found any code googling and have no clue how to search through records, here is the piece of code where I read through the data. I need help with these buttons Any code appreciated, THank You

This is my search button to search for one field but how Do I move through the data either forward or back?

Dim strSQL As String

strSQL = "Select * From pairs" & _

"WHERE([orderkey] = & String.Parse(txtorderkey.Text)"

 
I think when it calls from the database, the reader.GetSTring(index) cannot be null, think this is where the error is coming from
 
While reader.Read()
If Not reader(0) Is DBNull.Value Then
txtorderkey.Text = reader(0)
Else
txtorderkey.Text = ""
End If
etc .....
EndWhile

Haven't tried this code out, but you could do something along this line.
 
Back
Top