Pablo Software Solutions Forum Index Pablo Software Solutions

 
 FAQFAQ   SearchSearch   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Access database remains open

 
Post new topic   Reply to topic    Pablo Software Solutions Forum Index -> Quick 'n Easy Web Server
View previous topic :: View next topic  
Author Message
pduncan



Joined: 21 Jul 2006
Posts: 4

PostPosted: Wed Nov 08, 2006 11:25 pm    Post subject: Access database remains open Reply with quote

I am making an ADO connection to access. When I am done, I close and destroy my connections (I think?) but the Access database remains open. The only way I can get rid of the .ldb file is to stop the web server.

I end the code on my page with
Code:
   
   oRS.Close
   set oRS = Nothing
   
   oConn.Close
   set oConn = Nothing
      

Can you please suggest what I am doing wrong
Back to top
View user's profile Send private message
pduncan



Joined: 21 Jul 2006
Posts: 4

PostPosted: Thu Nov 09, 2006 7:07 am    Post subject: Reply with quote

I found the solution...

remove "server."

Server.CreateObject("ADODB.Connection")

and

Server.CreateObject("ADODB.Recordset")
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 13 Apr 2005
Posts: 1470

PostPosted: Thu Nov 09, 2006 7:25 am    Post subject: Reply with quote

Using
Server.CreateObject("")
will cache the database connection and adds a reference to the server's internal dispatch list.

Always use
CreateObject("ADODB.Connection")
unless you have a good reason to use Server.CreateObject("")
(for example event processing of ASP plugins)
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    Pablo Software Solutions Forum Index -> Quick 'n Easy Web Server All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SwiftBlue Theme created by BitByBit
Powered by phpBB © 2001, 2002 phpBB Group