have this code but not sure how i can use querystring from another search form page to define the CAT_ID = ? AND MAKE = ?
Thank you
Thank you
Code:
<%@ Language=VBScript %>
<% Option Explicit %>
<%
Dim objCN ' ADO Connection object
Dim objRS ' ADO Recordset object
Dim strsql ' SQL query string
Dim RecordsArray ' To hold the Array returned by GetRows
Dim i ' A counter variable
' Create a connection object
Set objCN = Server.CreateObject("ADODB.Connection")
' Connect to the data source
objCN.ConnectionString = "DATABASECONNECTION"
objCN.Open
' Prepare a SQL query string
strsql = "SELECT* FROM ADS WHERE CAT_ID = ? AND MAKE = ? ORDER BY CAT_ID DESC"
' Execute the SQL query and set the implicitly created recordset
Set objRS = objCN.Execute(strsql)
' Write out the results using GetRows in a loop
Response.write "<pre>"
Do While Not objRS.EOF
RecordsArray = objRS.GetRows(30)
' Print out the array
For i = 0 To UBound(RecordsArray, 2)
Response.write RecordsArray(0, i)
Response.write vbTab
Response.write RecordsArray(1, i)
Response.write vbTab
Response.write RecordsArray(2, i)
Response.write vbTab
Response.write RecordsArray(3, i)
Response.write vbTab
Response.write vbCrLf
Next
Loop
Response.write "</pre>"
objRS.Close
objCN.Close
Set objCN = Nothing
Set objRS = Nothing
%>
Comment