How to pass variables to ASP query

cinomaiqxn

New Member
I am an ASP beginner trying to make a very simple page. The functionality is to accept two inputs from the user and display a report based on those on the next page. The data for the report is fetched a SQL query on the ASP page.This is what I have done till now:\[code\]Set objConn = Server.CreateObject("ADODB.Connection")objConn.Open "Provider=MSDAORA; Data Source=?emam; User Id=xyz; Password=xyz;"aranan = Request("aranan")Set objRs = objConn.Execute("select * from my_department where user_id = <input from user>")if objRs.BOF and objRs.eof then response.endend if\[/code\]The problem I am facing is that I cannot find how to properly pass the user input in the query.Please help!
 
Back
Top