Error displaying

Results 1 to 2 of 2

Thread: Error displaying

  1. #1
    Join Date
    Dec 1969

    Default Error displaying

    &nbsp;<BR>I have checked out the FAQ&#039;s and searched this messageboard, but couldnt find anything to do with the following errors that will be received if:<BR>a) the user is denied access to a database/table (permissions)<BR>b) the database/table doesnt exist (say it&#039;s a temp table)<BR>c) if a user is denied running a command (flush priv, create, drop etc)<BR><BR>Is there a way to somehow get a status say 0 for success 1 for fail if you try to connect? That way, if the status returned is 1 then I can show a friendly error message instead of the detailed explanation (as the user wont have a clue what it&#039;s all about)<BR><BR>I am using ASP and MySql. <BR>If anyone can point me in the right direction, i&#039;d really appreciate it.<BR><BR>TQ :)

  2. #2
    Join Date
    Dec 1969

    Default RE: Error displaying

    I would suggest just trying to connect to the database or running a command, but after an "On Error Goto Next" command.<BR>Then you can catch any error and check what kind of error that was:<BR><BR>On Error Goto Next<BR>&#039; connect to database<BR>...<BR>&#039; execute a sql command<BR>...<BR>If Err.Number &#060;&#062; 0 Then<BR>&#039; error occured<BR>Response.write Err.Description &#039; or any other message<BR>End If<BR>&#039; reset error handling<BR>On Error Goto 0<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts