I am using the following code for a storedproc. If I hardcode the value it runs fine, however, what would be the correct syntax to pass a value from the querysting
<% Response.buffer = true
sdate = Request.Querystring("sdate")
edate = Request.Querystring("edate")
rmonth = Request.Querystring("rmonth")
rc = Request.Querystring("rc")
%>
<html>
<head>
<title>Running Stored Queries in Access Database</title>
<style>p { font-family:verdana,arial; font-size:10pt;
font-weight:bold; }</style>
</head>
<body><p>
<%
' Connection String
' Provide relative path to your StoredProc.mdb
' database
Dim connStr
connStr = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\inetpub\realmslore\www\upload\performance.mdb"
' Connection Object
Dim con
Set con = Server.CreateObject("ADODB.Connection")
' Recordset Object
Dim rs
' connecting to database
con.Open connStr
' executing stored procedure
Set rs = con.Execute ("exec tech '03012002' , '03092002' , 'ns410803' , '2' ")
'
set f_name = rs("f_name")
set l_name = rs("l_name")
set tot_hrs = rs("total_hrs")
set tot_ot = rs("total_ot")
set tot_comp = rs("total_comp")
set tot_tasks = rs("total_tasks")
set revisit = rs("revisit")
%>
<%= rc %>
<table width="100%">
<tr>
<td>Name</td>
<td>Total Hours</td>
<td>Total OT</td>
<td>Completes</td>
<td>Totals Tasks</td>
<td>HPD</td>
<td>DE</td>
<td>Revisit</td>
<td>ITP</td>
<td>QJPD</td>
</tr>
<%
While Not rs.EOF
%>
<tr>
<td><%= f_name %> <%= l_name %></td>
<td><%= tot_hrs %></td>
<td><%= tot_ot %></td>
<td><%= tot_comp %></td>
<td><%= tot_tasks %></td>
<td><%= FormatNumber(tot_hrs/tot_tasks, 2, -1, -1) %></td>
<td><%= FormatPercent(tot_comp/tot_tasks,-1, -1, -1) %></td>
<td><%= FormatPercent(revisit, 2, -1, -1) %></td>
<td><%= FormatNumber((tot_hrs/tot_tasks)/(tot_comp/tot_tasks*(1-revisit)), 2, -1, -1) %></td>
<td><%= FormatNumber(8/((tot_hrs/tot_tasks)/(tot_comp/tot_tasks*(1-revisit))), 2, -1, -1) %></td>
</tr>
I wanted to replace the values in RED with something like & rc & but I can't find the correct syntax...can it even be done in a stored proc????