VB.Net - Search String for Character and Add Single Quotes
Posted on 2014-10-06
Good Day Experts!
I have a VB.Net form that takes User input and retrieves records from a SQL database for display in a DataGrid.
I need to allow the User to enter multiple values in on2 of the textboxes. My plan was to tell the User to enter just a single value or multiples separated by a comma. I have my query behind the "Get Records" button built to accept
where in ('Value1','Value3'...etc).
I was going to iterate through the string until each comma was encountered then add a starting/ending single quote around the value then put the string back together.
Can you think of any functions that may help me achieve this end goal in the simplest fashion?