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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple search criteria

Status
Not open for further replies.

gesrod

Technical User
Jan 30, 2009
8
GB
Using Dreamweaver

Question 1, On my submit page1 I would like to filter using any of the criteria below within the select statement.
How can I filter the results on page 2 from any of the four criterias from page1 ? (in addition to the email a filter below ?

Question 2, I am also passing the request.form values from each criteria to a session but lose the sessions when navigating through pages if the results go on to 2 or more pages.

<%session("Str") = Request.Form("Street")%>
<%session("OrdNo")=Request.Form("OrderNo")%>
<%session("CRef")=Request.Form("Ref")%>
<%session("ProjName")=Request.Form("ProjectName")%>

Page2

Dim MyProjData
Dim MyProjData_numRows

Set MyProjData = Server.CreateObject("ADODB.Recordset")
MyProjData.ActiveConnection = MM_CLPortal_STRING
MyProjData.Source = "SELECT * FROM table1 WHERE EmailAddress = '" + Replace(MyProjData__MMColParam, "'", "''") + "'"

many thanks in anticipation.
 
Answer 1 - Depends on what database server you are using.


Answer 2 - Are you restarting the session on every request or initialising then including the variables on each 'page'?

Chris.

Indifference will be the downfall of mankind, but who cares?
Time flies like an arrow, however, fruit flies like a banana.

Never mind this jesus character, stars had to die for me to live.
 
Hi Chris,

Many thanks for your response.

I'm currently using SQL 2008

I would like to initialise and use sessions on subsequent pages.

regards
Gez
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top