Results 1 to 2 of 2

Thread: ADODB Error

  1. #1
    Join Date
    Dec 1969

    Default ADODB Error

    i am facing problem while creating ADODB object. <BR>We are creating an ADODB connection object on the default page<BR>of our website for accessing our database.And at the end of same page we are closing the connection . But the problem is when we move to another page and come back to default page or referesh the default page <BR>it shows error on line 2. <BR><BR><BR><BR><BR>1 Set Con = Server.CreateObject( "ADODB.Connection" )<BR>2 Con.Open "DSN=auction"<BR>3 Con.CommandTimeout = 30<BR>4 Con.ConnectionTimeout = 20<BR> <BR><BR> Con.Close<BR> set Con = Nothing<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: ADODB Error

    The first question I have is..other than the error, is the connection working? ie. are you able to access the database? If the answer is yes, everything is working as it should (other than the error) I would add<BR>&#060;% On Error Resume Next %&#062;<BR>at the top of your page above the &#060;HTML&#062; tag and see if that gets rid of it. If the connection isn&#039t working, don&#039t add this as it could eliminate error messages you need to troubleshoot your code. What is the text of the error message you are receiving?<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