bluejaguar456
Well-known member
- Joined
- Aug 22, 2006
- Messages
- 47
Hey Guys,
I have beeen working on a program for my sisters company for some time now, but recently had a break from it. I am now back on track with it though finally!
I am stuck on how to search the database for records containing a word the user specifies. At the moment i have got the code
This displays the records in labels that i want but only ggooes through the database without filtering the results of a search.
I need to be able to search through the database for the surname of a person. This will be under item(1) and the search would be a string that the user enters...
Can anyone help?
The following is the code iss the SQL for getting all records from he database without filtering
I have beeen working on a program for my sisters company for some time now, but recently had a break from it. I am now back on track with it though finally!
I am stuck on how to search the database for records containing a word the user specifies. At the moment i have got the code
Code:
sql = "SELECT * FROM tblclient" & txtsurname.Text WILL NOT EARCH FOR SPECIFIED TEXT!!!!
da = New OleDb.OleDbDataAdapter(sql, con)
da.Fill(ds, "Eclypse Live")
maxrows = ds.Tables("Eclypse Live").Rows.Count
lbltotallresults.Text = maxrows & " clients found."
inc = inc + 1
lnkresult1.Text = ds.Tables("Eclypse Live").Rows(inc).Item(1) & " " & ds.Tables("Eclypse Live").Rows(inc).Item(2) & " / " & ds.Tables("Eclypse Live").Rows(inc).Item(0)
inc = inc + 1
lnkresult2.Text = ds.Tables("Eclypse Live").Rows(inc).Item(1) & " " & ds.Tables("Eclypse Live").Rows(inc).Item(2) & " / " & ds.Tables("Eclypse Live").Rows(inc).Item(0)
inc = inc + 1
lnkresult3.Text = ds.Tables("Eclypse Live").Rows(inc).Item(1) & " " & ds.Tables("Eclypse Live").Rows(inc).Item(2) & " / " & ds.Tables("Eclypse Live").Rows(inc).Item(0)
inc = inc + 1
lnkresult4.Text = ds.Tables("Eclypse Live").Rows(inc).Item(1) & " " & ds.Tables("Eclypse Live").Rows(inc).Item(2) & " / " & ds.Tables("Eclypse Live")
This displays the records in labels that i want but only ggooes through the database without filtering the results of a search.
I need to be able to search through the database for the surname of a person. This will be under item(1) and the search would be a string that the user enters...
Can anyone help?
The following is the code iss the SQL for getting all records from he database without filtering
Code:
SELECT * FROM tblclient