Link to home
Start Free TrialLog in
Avatar of brgdotnet
brgdotnetFlag for United States of America

asked on

How to enclose a string in single quotes?

In VB .net I need to build a query that selects columns from a table. The table name will change
though. What I need to know is how to enclose the name of the table in single quotes. So for the example code below,
how can I combine the two strings so that the resulting string will have my table name enclosed in single quotes?

"SELECT SSN from 'Employees'   "


Dim TableName As String
TableName = "Employees"
Dim QueryString As String = " SELECT SSN from "
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia 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
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