Question how to do a searchwhich will return a corresponding result

clzanas

Member
Joined
Jul 15, 2009
Messages
16
Programming Experience
Beginner
Hi guys,

i am trying to do a search by typing some words in the textbox and if the word matches with the data in the database, it will return the corresponding value.

so if i got a book with the book information, it will return the book name and the information that is stored in the database.

Currently i have no idea how to get the string from the textbox to recognise the data with it. As i am new to the search program.

I already have the data populated in sql database 2005.

can anyone help me? thnks!!!
 
Im am not too farmiliar with sql databases, but you could use a For Loop, loop through all the rows while using String.compare(textboxValue,sqlValue) to check if they are the same, then retrieve. If String.compare() returns false it means the strings are the same, if it returns true it means they are different, so you carry on looping.
 
Are you able to get data from the database without filtering? How exactly are you doing that? Filtering based on the contents of a TextBox will be only a small adjustment to that.
 

Latest posts

Back
Top