Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Security problem with error trap

Status
Not open for further replies.

robinsql

Programmer
Aug 2, 2002
236
IE
Hi,
I'm reasonably new to ASP and I am trying to maintain somebody else's code. I was wondering if anybody had seen anything like the following before. I am about 70% certain this bit of code prevents certain users from accessing whichever page this is written on. It is at the top of all security sensetive pages. I'm not exactly sure how it does it.
Anyone got any ideas?
Thanks for any help,
Robin

on error resume next
sSQL = "EXEC sp_GetStations"
Set rsStations = g_Conn.Execute(sSQL)
if err.number <> 0 then
if Err.Number =-2147217911 then
Response.Write &quot;<p>You do not have permission to view this page.<p>&quot;
Response.End
else
Response.Write &quot;<p>&quot; & Err.number & &quot;<p>&quot;
Response.Write &quot;<p>&quot; & Err.Description & &quot;<p>&quot;
Response.Write &quot;<p>&quot; & Err.Source & &quot;<p>&quot;
Response.End
end if
end if
 
robinsql,

&quot;sp_GetStations&quot; is a Stored Procedure code that resides on the SQL server, acts much like a function. You need to get on the SQL server and view the stored procedure to fins out what it does.


fengshui_1998
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top