-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Release Database connection
PostPosted: Thu Nov 09, 2006 1:44 pm 
Newbie

Joined: Thu Oct 19, 2006 9:26 am
Posts: 4
Hi,

Building a windows forms application with a SQLExpress 2005 Database(DB).

I want to release the DB so i can do a backup to the DB.

How can i do this?

I've tried :
Code:
factory.OpenSession().Connection.Close();
and
factory.OpenSession().Close();
and
factory.Close();


and a bunch of other combinations to close the session and the connection but....nothing :(

the database its only released when i close the application.

Help please.
Thanx


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 10, 2006 2:06 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Looks like it's caused by connection pooling. I don't know if there's any way to tell ADO.NET to close all connections it is pooling.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 10, 2006 8:40 am 
Senior
Senior

Joined: Sat Mar 25, 2006 9:16 am
Posts: 150
You can disable connection pooling in the connection string, but there is a severe performance penalty. Why not just recycle your app when you want to do a backup?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


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

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.