S
solomon_13000
The code bellow functions well. However if I want to obtain a return
value using the code bellow, how is it done?
<%
Sub RunQueryString (pSQL,parms)
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("/db/upload/stelladb.mdb") & ";"
Set cmd = Server.CreateObject("adodb.command")
With cmd
..CommandText = pSQL
..CommandType = 1
set .ActiveConnection = conn
err.clear
..Execute ,parms,128
if Err.number <> 0 then
Response.Write(Err.number & ":" & Err.Description & "
")
end if
on Error goto 0
End with
conn.close
Set conn = nothing
End Sub
%>
<%
if Request.QueryString("Action") = 1 then
username = Trim(request.form("username"))
password = Trim(request.form("password"))
if username <> "" and password <> "" then
arParms = Array(username,password)
sql = "SELECT Count(*) FROM Account WHERE username=? AND password=?"
RunQueryString sql, arParms
end if
end if
%>
value using the code bellow, how is it done?
<%
Sub RunQueryString (pSQL,parms)
on error resume next
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
Server.MapPath("/db/upload/stelladb.mdb") & ";"
Set cmd = Server.CreateObject("adodb.command")
With cmd
..CommandText = pSQL
..CommandType = 1
set .ActiveConnection = conn
err.clear
..Execute ,parms,128
if Err.number <> 0 then
Response.Write(Err.number & ":" & Err.Description & "
")
end if
on Error goto 0
End with
conn.close
Set conn = nothing
End Sub
%>
<%
if Request.QueryString("Action") = 1 then
username = Trim(request.form("username"))
password = Trim(request.form("password"))
if username <> "" and password <> "" then
arParms = Array(username,password)
sql = "SELECT Count(*) FROM Account WHERE username=? AND password=?"
RunQueryString sql, arParms
end if
end if
%>