Link to home
Start Free TrialLog in
Avatar of ksfok
ksfok

asked on

VB.NET/C# equivalent for SQL T-SQL syntax

Given the following SQLcommend Text as sample:
"select * from customers where cust_id like '%" + textbox1.text.tostring.trim +"&'"
What's the VB.NET/C# equivalent for it as below:
Dim CustID As String
if CustID ??? textbox1.text.tostring.trim
??? is the code you fill in for the T-SQL "like".
Thanks.
 




Avatar of LiorRon
LiorRon

What is it you are trying to accomplish ?
Avatar of ksfok

ASKER

Look for a string that contains a particular string.
SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ksfok

ASKER

What about:

textToSearch.contains(findThis)

?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial