I
isaac2004
hello i am trying to use a response redirect statment to show a message
upon deletion of a record from a database. my database is ran though a
page with a table with a delete option on the side. when the delete
link is clicked, the script loads a page that has a immediate
response.redirect in it. here is that code for the delete_response
page.
<% Option Explicit %>
<!--#include virtual="\06Winter/levini/database/adovbs.inc"-->
<!--#include file="DatabaseConnect2.asp"-->
<HTML>
<center>
<% Dim objRS, bolFound, CustID, intCustID
CustID = Request.querystring("CustID")
intCustID = CInt(request("CustID"))
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tblCustomerData", objConn, adOpenForwardOnly,
adLockOptimistic, adCmdTable
bolFound = False
'look for CustID in table
Do While Not (objRS.EOF OR bolFound)
If (StrComp(objRS("CustID"), CustID, vbTextCompare) = 0) Then
BolFound = True
Else
objRS.MoveNext
End If
Loop
objRS.Delete
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
response.redirect "ListCustomers.asp?StatusMessage=Customer ID "
& request("CustID") & " successfully deleted."
%>
</BODY>
</HTML>
what i want to do is put a message on my mainpage that displays the
message from the response.redirect prompt. how do i create a message
from reading the querystring
thanx for the help
isaac
upon deletion of a record from a database. my database is ran though a
page with a table with a delete option on the side. when the delete
link is clicked, the script loads a page that has a immediate
response.redirect in it. here is that code for the delete_response
page.
<% Option Explicit %>
<!--#include virtual="\06Winter/levini/database/adovbs.inc"-->
<!--#include file="DatabaseConnect2.asp"-->
<HTML>
<center>
<% Dim objRS, bolFound, CustID, intCustID
CustID = Request.querystring("CustID")
intCustID = CInt(request("CustID"))
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open "tblCustomerData", objConn, adOpenForwardOnly,
adLockOptimistic, adCmdTable
bolFound = False
'look for CustID in table
Do While Not (objRS.EOF OR bolFound)
If (StrComp(objRS("CustID"), CustID, vbTextCompare) = 0) Then
BolFound = True
Else
objRS.MoveNext
End If
Loop
objRS.Delete
objRS.Close
Set objRS = Nothing
objConn.Close
Set objConn = Nothing
response.redirect "ListCustomers.asp?StatusMessage=Customer ID "
& request("CustID") & " successfully deleted."
%>
</BODY>
</HTML>
what i want to do is put a message on my mainpage that displays the
message from the response.redirect prompt. how do i create a message
from reading the querystring
thanx for the help
isaac