Groups | Blog | Home
all groups > sql server (microsoft) > may 2006 >

sql server (microsoft) : Invalid operation. The connection is closed.


archana
5/22/2006 7:06:06 AM
Hi all,

I am using sqlconnection in .net and opening connection at the begining
of application and closing it at the end.

But some time i am getting error.
'Invalid operation. The connection is closed.'

can someone tell me reason behind this error.

Please tell me as this is very very imp for me

Thanks in advance.
SQL
5/22/2006 7:21:44 AM
Is autoclose set to on?
run this in query analyze, change pubs to your database name
SELECT DATABASEPROPERTY( 'pubs' , 'IsAutoClose' )


Denis the SQL Menace
http://sqlservercode.blogspot.com/
archana
5/22/2006 9:58:09 PM
Hi,

thanks for your reply.

But after executing this query it is giving me 0 means it is disable.

Is there any other way to check recently closed connection with
username so that i can get idea about whether connection which user is
using is open or close.

If you know please let me know abt this.

thanks.
AddThis Social Bookmark Button