Find partial matchs in string.
Im using the visual C# studio express and im trying to make an phone number rgram that will hold multiple name phone number town etc entry, i did all the tutorial about how to connect the SQL to my application how to create one etc, ut the only part they didnt say is how to search an item in the database.
Here is a quick explanation of my forms
2 radiobutton one is opname and one is oplastname
textbox ( for entering the search request.
one quit button
one edit button ( to add and remove entry for database )
one search button
actually i want to be able to search either in the name or lastname columns in the database Name and the other Lastname depending on wich radiobutton they choose so far my code look like that.
public void bcsearch_OnClick()
{
string searchtype = "";
if ( opname.Checked == true )
searchtype = "Name";
else if ( oplastname.Checked == true )
searchtype = "Lastname":
}
and... thats about it.... i think you figure out why i made these if statement it will be to use the variable searchtype instead of the name of the column. can somone help me please?
Im using the visual C# studio express and im trying to make an phone number rgram that will hold multiple name phone number town etc entry, i did all the tutorial about how to connect the SQL to my application how to create one etc, ut the only part they didnt say is how to search an item in the database.
Here is a quick explanation of my forms
2 radiobutton one is opname and one is oplastname
textbox ( for entering the search request.
one quit button
one edit button ( to add and remove entry for database )
one search button
actually i want to be able to search either in the name or lastname columns in the database Name and the other Lastname depending on wich radiobutton they choose so far my code look like that.
public void bcsearch_OnClick()
{
string searchtype = "";
if ( opname.Checked == true )
searchtype = "Name";
else if ( oplastname.Checked == true )
searchtype = "Lastname":
}
and... thats about it.... i think you figure out why i made these if statement it will be to use the variable searchtype instead of the name of the column. can somone help me please?