SQL Error trapping

Results 1 to 2 of 2

Thread: SQL Error trapping

  1. #1
    Jin Saini Guest

    Default SQL Error trapping

    The following error appears beacause the user attempting to update the DB does not have permission. How do you trap this error before it gets displayed???<BR><BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80004005&#039; <BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]DELETE permission denied on object &#039;JinUser&#039;, database &#039;Users&#039;, owner &#039;dbo&#039;. <BR><BR>/Authentication/checkUser.asp<BR>

  2. #2
    Kevin Guest

    Default Try this

    Place this i your Asp if you are executing this Db delete from an Asp page<BR> <BR>---------------------------------------<BR> On error resume next<BR> <BR> Set Ado = server.CreateObject("ADODB.Connection")<BR> Ado.Open "DSN=BLAH"<BR> Ado.Execute "sSQL"<BR>if Err.Number &#060;&#062; 0 then<BR> Response.Write Err.description <BR>End if<BR>---------------------------------------<BR>this will allow the page to continue but display the error

Posting Permissions

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