Insert Variable into query string

D

Dave Lagergren

I have a query string:

objRS.Open "Select * from Results WHERE Key =33", objConn, 0, 1

I need to change the 33 to the variable SearchText defined as follows:

Dim SearchText
SearchText = (Request("Key"))

This variable is passed from another .asp program. If I use:

Response.Write(SearchText)

It displays correctly.

I am using an access DB with FP2003.
 
K

Ken Snell \(MVP\)

objRS.Open "Select * from Results WHERE Key =" & SearchText, objConn, 0, 1
 
D

Dave Lagergren

That got it!

Thanks a pile for your help. I understand enough html and asp to get myself
in trouble. One day I really need to learn this stuff but in the meantime
help from people like you is invaluable.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top