Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query with parameter in ASP 1

Status
Not open for further replies.

Rydel

Programmer
Feb 5, 2001
376
CZ
Dear gurus,

I have a question on how to call query with a parameter from ASP pages. To illustrate my problem with an example let's say, I have myDB.mdb and in it I have the following query named myQuery:

Code:
PARAMETERS currAge;
SELECT * FROM experts WHERE Age>currAge;

I also have something like this in an ASP file:

Code:
set cnn = Server.CreateObject("ADODB.Connection")
cnn.Open "driver={Microsoft Access Driver *.mdb)};;DBQ=d:/myDB.mdb;"
strSQL = ???????? ' here I want to call the above query and supply the parameter currAge!
set Results = cnn.Execute(strSQL)

Question: what goes into strSQL=?????? instead of question marks to call the Access query and supply the parameter for it.

Thanks a lot in advance! ---
---
 
nothing. It is just a string. You get a recordset as return. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top