xesojay
10-06-2005, 10:37 AM
Hi Guys,
Am trying to compare two value using asp. The first value is what the user enter in a textbox and the second value will be what my recordset return from the db. But I got this error msg after I executemy code below. If you know a better way of doing this please let me know. Thanks
Error Msg : Error Type:
(0x80020009)
Exception occurred.
/mtn/fund_trans_req_act.asp, line 29
My code is this :
<!--#include file="Connections/Conn.asp" -->
<%
strUser=Session("MM_Username")
dim ObjConn, ObRs,strSql,strUser,RsSelect1,RsSelect2,strAccName,strBank
dim strAccNum,strAmount, strRef,strComment, strAuth1, strAuth2,strStatus,strIP
strAccName = request.Form("accname")
strBank = request.Form("bank")
strAccNum = request.Form("accnumber")
strAmount = request.Form("amount")
strRef = request.Form("mtn_ref")
strComment = request.Form("mtn_comment")
strAuth1 = request.Form("firstAuth")
strAuth2 = request.Form("SecondAuth")
strStatus = "1"
strIP = request.Form("Req_sys_IP")
set ObjConn = Server.CreateObject("adodb.Connection")
set ObjRs = Server.CreateObject("adodb.Recordset")
'set RsSelect1 = Server.CreateObject("adodb.Recordset")
'set RsSelect2 = Server.CreateObject("adodb.Recordset")
ObjConn.open("mtn")
strSql= " Select * from tblAuth where StaffID='"&strAuth1&"' "
set ObjRs = ObjConn.execute(strSql)
if CCur(request.Form("amount")) > CCur(ObjRs.fields("MaxAmount")) then
response.Write("<script>history.go(1); alert('Sorry !, Your First Authoriser can not Authorized this Transaction.\n As the amount is greater than what he can authorised.\n Please choose another Authoriser ')</script>")
end if
%>
Am trying to compare two value using asp. The first value is what the user enter in a textbox and the second value will be what my recordset return from the db. But I got this error msg after I executemy code below. If you know a better way of doing this please let me know. Thanks
Error Msg : Error Type:
(0x80020009)
Exception occurred.
/mtn/fund_trans_req_act.asp, line 29
My code is this :
<!--#include file="Connections/Conn.asp" -->
<%
strUser=Session("MM_Username")
dim ObjConn, ObRs,strSql,strUser,RsSelect1,RsSelect2,strAccName,strBank
dim strAccNum,strAmount, strRef,strComment, strAuth1, strAuth2,strStatus,strIP
strAccName = request.Form("accname")
strBank = request.Form("bank")
strAccNum = request.Form("accnumber")
strAmount = request.Form("amount")
strRef = request.Form("mtn_ref")
strComment = request.Form("mtn_comment")
strAuth1 = request.Form("firstAuth")
strAuth2 = request.Form("SecondAuth")
strStatus = "1"
strIP = request.Form("Req_sys_IP")
set ObjConn = Server.CreateObject("adodb.Connection")
set ObjRs = Server.CreateObject("adodb.Recordset")
'set RsSelect1 = Server.CreateObject("adodb.Recordset")
'set RsSelect2 = Server.CreateObject("adodb.Recordset")
ObjConn.open("mtn")
strSql= " Select * from tblAuth where StaffID='"&strAuth1&"' "
set ObjRs = ObjConn.execute(strSql)
if CCur(request.Form("amount")) > CCur(ObjRs.fields("MaxAmount")) then
response.Write("<script>history.go(1); alert('Sorry !, Your First Authoriser can not Authorized this Transaction.\n As the amount is greater than what he can authorised.\n Please choose another Authoriser ')</script>")
end if
%>