|
|
|
|
|
| | |
|
Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Trapping ADO errors |
From: |
mc |
Date: |
8/9/2000 5:01:05 PM |
IP: |
63.214.237.90 |
Hi,
you can have a select stmt. at the end of your code.
err.clear
on error resume next
lsConn = session("ConnectionString")
set lconn = server.CreateObject("ADODB.Connection")
lconn.ConnectionString = lsConn
lconn.Open
lsSQL = "SELECT user_id, user_rights FROM csac_users" & _
" WHERE user_id = " & lsUser & ""
set rs = server.CreateObject("ADODB.Recordset")
rs.Open lsSQL, lsConn
set rs = lsConn.Execute(lsSQL)
if err.number>0 then
Select case(err.number)
case 0:
case 2210: lsError = "There was an error processing the query. <p>" &_
"The SQL error was: & err.SQLState"
Response.Write(lsError)
case else: Msgbox "comment goes here"
End Select
end if
I am not sure about the syntax.
Hope this helps :) |
Previous Message
|
|
|
|
|
|
|
|
|
|
|
|