| View previous topic :: View next topic |
| Author |
Message |
ohno-again Newbie
Joined: 23 Sep 2005 Posts: 6
|
Posted: Nov 23rd, 2005 07:04 PM Post subject: ms access database locks can not filecopy |
|
|
--------------------------------------------------------------------------------
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 |
|
VB_Developer Newbie
Joined: 25 Feb 2006 Posts: 18 Location: Hyderabad, India
|
Posted: Feb 26th, 2006 04:02 AM Post subject: |
|
|
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 |
|
|