Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting

Post new topic   Reply to topic
ms access database locks can not filecopy
View previous topic :: View next topic  
Author Message
ohno-again
Newbie


Joined: 23 Sep 2005
Posts: 6

PostPosted: Nov 23rd, 2005 07:04 PM    Post subject: ms access database locks can not filecopy Reply with quote

--------------------------------------------------------------------------------

Hi,

I am using vb6.
the application prints from an access db I use a Data environment and data report to print.

The problem is that I need to close the connection to copy the ms access db that is used to print the reports but the access db that was used to printed (so now the connection is open) previously is still locked (i.e. and opens the microsoft access record-locking infomation file in the same directory) and wont unlock it for some reason.

When I try to do a file copy I get error.

Is there some other way to copy the access db other than filecopy? if not, how do I unlock the access db that is used to print? because

I tried closing the connection ie
dataenvironement.connection.close and also
dataenvironement.recordsource.close
dataenvironement.connection.close
neither worked.

thanks again for any help

thanks for any help
Back to top
View user's profile Send private message
VB_Developer
Newbie


Joined: 25 Feb 2006
Posts: 18
Location: Hyderabad, India

PostPosted: Feb 26th, 2006 04:02 AM    Post subject: Reply with quote

Hi,
Try this code before closing the connection and recordsource.

[VBCode]

set dataenvironment.connection = nothing
set dataenvironment.recordsource = nothing

[/VBCode]

dataenvironement.connection.close and also
dataenvironement.recordsource.close
dataenvironement.connection.close
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Visual Basic Forum for Visual Basic Programmers VB Forum Index » Database & Reporting All times are GMT - 5 Hours
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


Visual Basic Forum runs phpBB | Forum Template © iOptional
VB Resources | SSL | Visual Basic