error in sql server 2008
-
when i wanna to get script from my DB in sql server management 2008 i get this error : There is already an open DataReader associated with this Command which must be closed first.....what is meann of this error note : 1.even i stop start the instance. 2.copy the DB to other system also but same error ! thanks in advnaced !
-
when i wanna to get script from my DB in sql server management 2008 i get this error : There is already an open DataReader associated with this Command which must be closed first.....what is meann of this error note : 1.even i stop start the instance. 2.copy the DB to other system also but same error ! thanks in advnaced !
This is not a sql error, it is in your code. You are opening a second connection before closing the first connection either using async calls or creating a new instance of your DAL class.
Never underestimate the power of human stupidity RAH
-
This is not a sql error, it is in your code. You are opening a second connection before closing the first connection either using async calls or creating a new instance of your DAL class.
Never underestimate the power of human stupidity RAH
Mycroft Holmes wrote:
You are opening a second connection before closing the first connection
A second connection wouldn't cause a problem. It's opening a second
DataReader
on the same connection which causes this error.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
when i wanna to get script from my DB in sql server management 2008 i get this error : There is already an open DataReader associated with this Command which must be closed first.....what is meann of this error note : 1.even i stop start the instance. 2.copy the DB to other system also but same error ! thanks in advnaced !
You are trying to open two
DataReader
instances (by callingExecuteReader
) on the same connection at the same time. You need to make sure that everyDataReader
is closed properly by wrapping it in ausing
block, and that you close one before trying to open another.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
-
You are trying to open two
DataReader
instances (by callingExecuteReader
) on the same connection at the same time. You need to make sure that everyDataReader
is closed properly by wrapping it in ausing
block, and that you close one before trying to open another.
"These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer
You can if you're using multiple Active Result Sets[^] on an SQLServer, and on Oracle you can anyway[^].
Politicians are always realistically manoeuvering for the next election. They are obsolete as fundamental problem-solvers. Buckminster Fuller
-
when i wanna to get script from my DB in sql server management 2008 i get this error : There is already an open DataReader associated with this Command which must be closed first.....what is meann of this error note : 1.even i stop start the instance. 2.copy the DB to other system also but same error ! thanks in advnaced !
One of my Stored Procedures was using ۀ in its name and when i am getting script it was giving error!