DotNetNewsgroup.com  
web access to complete list of Microsoft.NET newsgroups
   home   |   control panel login   |   archive  |  
 
  carried group
academic
adonet
aspnet
aspnet.announcements
aspnet.buildingcontrols
aspnet.caching
aspnet.datagridcontrol
aspnet.mobile
aspnet.security
aspnet.webcontrols
aspnet.webservices
assignment_manager
datatools
dotnet.distributed_apps
dotnet.general
dotnet.myservices
dotnet.nternationalization
dotnet.scripting
dotnet.security
dotnet.vjsharp
dotnet.vsa
dotnet.xml
dotnetfaqs
framework
framework.clr
framework.compactframework
framework.component_services
framework.controls
framework.databinding
framework.drawing
framework.enhancements
framework.interop
framework.odbcnet
framework.performance
framework.remoting
framework.sdk
framework.setup
framework.webservices
framework.windowsforms
framework.wmi
frwk.windowsforms.designtime
lang.csharp
lang.jscript
lang.vb
lang.vb.controls
lang.vb.data
lang.vb.upgrade
lang.vc
lang.vc.libraries
  
 
start date: Mon, 23 Jul 2007 18:02:43 +0200,    posted on: microsoft.public.dotnet.languages.vb.data        back       

Thread Index
  1    Michel Vanderbeke
          2    Michel Posseth [MCP]


Detach my database from SQL SERVER   
Hello,

When I have closed my appliciation in VB.NET, and I try to detach my 
database from SQL SERVER, I often get a message that the database cannot be 
detatched, because it is still in use.
So I think there is some code missing in my application (in the 
MDI_FormClosing?) to make my database is no longer in use.

I already put a Connection.Close in the FormClosing also in a Finally-block 
of that FormClosing, but that does not seem to be enough.

Can someone help me with that?

Many thanks and greetings,

Michel
Date:Mon, 23 Jul 2007 18:02:43 +0200   Author:  

Re: Detach my database from SQL SERVER   
Even if the connection is closed , it can still be hanging around in the 
connection pool

read this :
http://msdn2.microsoft.com/en-us/library/8xx3tyca(VS.80).aspx

if possible ( if you use VB.Net 2005  )  use using staments with all your 
database actions inclusive setting up your connection object
( setting up a program wide connection is not necesary annymore because of 
ADO.Net`s superior pooling mechanism )


regards

Michel





"Michel Vanderbeke"  schreef in bericht 
news:46a4d124$0$14233$ba620e4c@news.skynet.be...

> Hello,
>
> When I have closed my appliciation in VB.NET, and I try to detach my 
> database from SQL SERVER, I often get a message that the database cannot 
> be detatched, because it is still in use.
> So I think there is some code missing in my application (in the 
> MDI_FormClosing?) to make my database is no longer in use.
>
> I already put a Connection.Close in the FormClosing also in a 
> Finally-block of that FormClosing, but that does not seem to be enough.
>
> Can someone help me with that?
>
> Many thanks and greetings,
>
> Michel
>
> 
Date:Thu, 26 Jul 2007 18:46:59 +0200   Author:  

Google
 
Web dotnetnewsgroup.com


COPYRIGHT ?2005, EUROFRONT WORLDWIDE LTD., ALL RIGHT RESERVE  |   Contact us