I have a select statement as below.


select * from candidate where resume REGEXP 'JAVA';


i am developing an application for searching resumes. I have a tex box where I can give keywords like Java in about example.

The applciation is in MSQL as a back end. I am taking the value from the text field in a string variable . How to use the variable in select statement above instead of actual values?

Please help.

The application is in vb.net.

>How to use the variable in select statement above instead of actual values?

& - String concatenate operator.

str="Select * from TableName where  column1='" & var1 & "'"

Thank you!!!!

>How to use the variable in select statement above instead of actual values?

& - String concatenate operator.

str="Select * from TableName where  column1='" & var1 & "'"

Thank you fir your previous help. It worked but when I run a query I get an error as bilow.


Indexoutofrange exception unhandled.


How shpuld I solve this? I am not so good with VB.net. If you can give me step by step insturctions that will be great.

>How to use the variable in select statement above instead of actual values?

& - String concatenate operator.

str="Select * from TableName where  column1='" & var1 & "'"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.