Windows 2000 and ADODB Connections

Results 1 to 2 of 2

Thread: Windows 2000 and ADODB Connections

  1. #1
    Paul Shoe Guest

    Default Windows 2000 and ADODB Connections

    I guess I&#039m late to discovering this, but there really ARE more than a few differences between the way Windows 2000 and its version of ASP (currently 3.0) handle things compared to Windows NT 4.0 (and ASP 2.0). I wish there was a comprehensive list of these differences somewhere...(4 Guys, you&#039ve not let us down before). In the meantime, here is one possibly useful item that I discovered today.<BR><BR>"Don&#039t close ADODB Connections that aren&#039t open." Pretty simple, huh?<BR><BR>What I mean is, don&#039t try to run a line like the following when Conn does not exist.<BR><BR>&#060;%<BR>Conn.Close<BR>Set Conn = Nothing<BR>%&#062;<BR><BR>You&#039ll get the following error: <BR><BR>Microsoft VBScript runtime error &#039 800a01a8&#039 <BR><BR>Object required <BR><BR><BR>I ran into problem by using an #include file which closed a connection that my main document also wanted to close.<BR><BR>On my ASP 2.0 server, I was able to get away with this. On the ASP 3.0 server, I&#039m not.<BR><BR>Not a big deal. Except that I had to spend a few minutes wondering why a page that has functioned perfectly for two years suddenly was breaking. Hope others aren&#039t as silly as I was.<BR>

  2. #2 Guest

    Default RE: Windows 2000 and ADODB Connections

    Are you sure that you could close a non-existent object in ASP 2? I thought that would always have caused an error. I have gone to great lengths to make sure that I never close an object that has not been openned. If you are doing so, then (with due respect) I would call that sloppy programming. I usually use the isObject and the Connection.State property to make sure that the object exists and that it is open.<BR><BR>I also encapsulate this in a CleanUp subroutine, so that I can easily call it at any time that a need to dispose of objects before ending a script.

Posting Permissions

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