Variable in an SQL query

Hi, i'm trying to do the following sql statement within a program:

Select ColumnName from Table where ColumnName = Variable

the Variable is the result of a combobox selection.
Who is Participating?
Dim varName as string="Value"

and then varName in a query as "@varName"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.