Hi frends,
I am working on ASP,VBSCRIPT,JA VASCRIPT...
Suppose if i have an condition in the script and if the condtion fails then i want to break the flow and raise the error .....i mean the below code should not be executed and the page should remain the same.
Response.end will stop rendering the below page.
See the below snippet..
[CODE=asp]dim arrSelect(1)
arrSelect(0) = "empid"
dim dbconnCheck
set dbconnCheck=ser ver.CreateObjec t("dbcom.dbhand ler")
dbconnCheck.con nect
dbconnCheck.For mSQLStmt "emp",4,arrSele ct,,"where empid='"&Reques t.Form("employe eid")&"'"
dbconnCheck.Exe cuteSql
set empidot = Server.CreateOb ject("Adodb.Rec ordSet")
set empidot = dbconnCheck.Get Recordset
if empidot.RecordC ount > 0 then
Response.Write( "<script>alert( 'No record found')</script>")[/CODE]
Thanks in Advance
Nitin Sharma
Software Engineer
I am working on ASP,VBSCRIPT,JA VASCRIPT...
Suppose if i have an condition in the script and if the condtion fails then i want to break the flow and raise the error .....i mean the below code should not be executed and the page should remain the same.
Response.end will stop rendering the below page.
See the below snippet..
[CODE=asp]dim arrSelect(1)
arrSelect(0) = "empid"
dim dbconnCheck
set dbconnCheck=ser ver.CreateObjec t("dbcom.dbhand ler")
dbconnCheck.con nect
dbconnCheck.For mSQLStmt "emp",4,arrSele ct,,"where empid='"&Reques t.Form("employe eid")&"'"
dbconnCheck.Exe cuteSql
set empidot = Server.CreateOb ject("Adodb.Rec ordSet")
set empidot = dbconnCheck.Get Recordset
if empidot.RecordC ount > 0 then
Response.Write( "<script>alert( 'No record found')</script>")[/CODE]
Thanks in Advance
Nitin Sharma
Software Engineer
Comment