error message's problem

Results 1 to 2 of 2

Thread: error message's problem

  1. #1
    Join Date
    Dec 1969

    Default error message's problem

    I am useing the connection string <BR><BR>set conn = Server.CreateObject("ADODB.Connection")<BR> nnectionstring= "Provider=MSDAORA.1;User ID=xxxxx;Password=xxxxx;Data Source=Troe6000;Persist Security Info=False"<BR><BR><BR>I am getting message like this<BR>Microsoft OLE DB Provider for Oracle error &#039;80004005&#039; <BR>ORA-12505: TNS:listener could not resolve SID given in connect descriptor <BR><BR>I want to shut these message off and use my own in my asp&#039;s can I do that?

  2. #2
    Join Date
    Dec 1969

    Default Trapping errors...

    Sure!<BR><BR>&#060;%<BR>...<BR>On Error Resume Next<BR>... do something that might cause an error ...<BR>On Error GoTo 0<BR>... check to see if an error happened ...<BR><BR>%&#062;<BR><BR>How do you check to see if an error happened? Depends on the kind of error.<BR><BR>In your case, a simple way would be to do<BR><BR>&#060;%<BR>If conn.State &#060;&#062; adStateOpen Then<BR>&nbsp; &nbsp; Response.Write "I couldn&#039;t open the connection."<BR>&nbsp; &nbsp; Response.End<BR>End If<BR>%&#062;<BR><BR>You can also look at the VBS builtin ERR object and at the ADODB.Connection.Errors collection.<BR><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