Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / May 2005



Tip: Looking for answers? Try searching our database.

Releasing lock on MDB file after DataReport closes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Martin A. Weinberger - 26 May 2005 23:21 GMT
Hi all,

I've noticed that if I call DataReport1.Show that after I regain control
after that call that the MDB file that the report used still has a lock on
it, as is evident by the LDB file. I've even tried calling "Unload
DataReport1" and still the same thing. Only when my application closes does
the DataReport release the lock. I've tried capturing the Terminate event
and manually closing the connection, but that didn't do anything.

Thank you in advance for any assistance.

Signature

Martin A. Weinberger
ButterflyVista
http://www.butterflyvista.com/

Veign - 27 May 2005 01:12 GMT
From a post by Jeff Johnson:

"You have posted this question individually to
multiple groups. This is called Multiposting
and it's BAD. Replies made in one group will
not be visible in the other groups, which
may cause multiple people to respond to your
question with the same answer because they
didn't know someone else had already done it.
This is a waste of time.

If you MUST post your message to multiple
groups, post a single message and select all
the groups (or type their names manually,
separated by commas) in which you want it to
be seen. This is called Crossposting and when
used properly it is GOOD."

Signature

Chris Hanscom - Microsoft MVP (VB)
Veign's Resource Center
http://www.veign.com/vrc_main.asp
--
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/

> Hi all,
>
[quoted text clipped - 6 lines]
>
> Thank you in advance for any assistance.
Paul Clement - 27 May 2005 15:57 GMT
¤ Hi all,
¤
¤ I've noticed that if I call DataReport1.Show that after I regain control
¤ after that call that the MDB file that the report used still has a lock on
¤ it, as is evident by the LDB file. I've even tried calling "Unload
¤ DataReport1" and still the same thing. Only when my application closes does
¤ the DataReport release the lock. I've tried capturing the Terminate event
¤ and manually closing the connection, but that didn't do anything.
¤
¤ Thank you in advance for any assistance.

Data bound controls tend to maintain persistent connections throughout the life of the application.
I'm not sure what your DataSource is but if it's the Data Control then that would explain the
behavior.

Paul
~~~~
Microsoft MVP (Visual Basic)
Martin A. Weinberger - 27 May 2005 17:10 GMT
Hi Paul,

The Data Source for my DataReport in my case is the DataEnironment that I
created (designed) for it. It does appear to have a persistent connection.
Is there any way to coax the DataEnvironment to release it's lock? Unloading
the DataReport doesn't cause the embedded DataEnvironment object to release
it's lock, unfortunately.

Thanks Paul.

Signature

Martin A. Weinberger
ButterflyVista
http://www.butterflyvista.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.