havey
04-16-2006, 08:34 AM
can someone plesae explain to me why this code in an asp page doesn't work correctly, this all the code that is in the asp page:
<!--#include file="includes\global.inc"-->
<!--#include file="includes\db.inc"-->
<%
Dim MyVar
MyVar = MsgBox ("Are you sure you want to delete List?", vbOKCancel, "MsgBox Example")
If MyVar = 1 Then 'user pressed yes
strSql = "Update recruitmentLists Set DelGrp = 1 AND usey='no' Where groupID =" &Request.QueryString("grp")
Set objRS = gobjConn.Execute(strSql)
objRS.Close()
Set objRS = Nothing
MsgBox ("List Deleted!"), vbOKOnly)
response.redirect "viewLists.asp"
Else
response.redirect "viewLists.asp"
End If
%>
<!--#include file="includes\global.inc"-->
<!--#include file="includes\db.inc"-->
<%
Dim MyVar
MyVar = MsgBox ("Are you sure you want to delete List?", vbOKCancel, "MsgBox Example")
If MyVar = 1 Then 'user pressed yes
strSql = "Update recruitmentLists Set DelGrp = 1 AND usey='no' Where groupID =" &Request.QueryString("grp")
Set objRS = gobjConn.Execute(strSql)
objRS.Close()
Set objRS = Nothing
MsgBox ("List Deleted!"), vbOKOnly)
response.redirect "viewLists.asp"
Else
response.redirect "viewLists.asp"
End If
%>