Help-database connection error

Results 1 to 3 of 3

Thread: Help-database connection error

  1. #1
    Jaz Guest

    Default Help-database connection error

    The following code works fine when tested internally.<BR><BR>set conn = server.createobject("adodb.connection")&#039line 227<BR>sConn="DRIVER={Microsoft Access Driver (*.mdb)}; "<BR>sConn=sConn & "DBQ=" & server.mappath("guestbook.mdb")<BR>conn.Open sConn<BR>Response.Write "connected"<BR><BR>But produces the following error when tested externally (intranet)i.e from another client based at another office.<BR><BR><BR>ADODB.Connection error &#039 80020009&#039 <BR><BR>The operation requested by the application is not allowed if the object is closed. <BR><BR>/asp/inq.asp, line 227 <BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Help-database connection error

    If you are testing this on another server and that database and DSN are not set up on it then this won&#039t work.

  3. #3
    Daveman Guest

    Default RE: Help-database connection error

    Try creating your connection at the top of your application. Also, if you have a connection before that on your same page and you are assigning the same variable without closing it and assinging it to nothing (myConn.Close Set myConn=nothing), then you will get that error as well.

Posting Permissions

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