This is a migrated thread and some comments may be shown as answers.

Context ConnectionState.Broken

3 Answers 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
adi
Top achievements
Rank 1
adi asked on 19 Dec 2012, 04:53 PM
Hi,

I was wondering that my context connection becomes a broken state. What could be the reason? How can I handle this? If I want to close and reopen, I always get an exception Cannot call 'open or close' on a context bound connection.
Regards, adi

3 Answers, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 21 Dec 2012, 04:57 PM
Hi Andreas,

 How are you using this context and the connection you obtain from it? Opening and closing a context bound connection is managed internally by OpenAccess. Can you reproduce this 'broken' state consistently. If yes, can you please send me the code to do that?
If the connection state is broken you should dispose this context instance and create a new one.
If you can provide me with more details on what you want to achieve I could provide you with an appropriate solution.

Kind regards,
Ady
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
0
adi
Top achievements
Rank 1
answered on 02 Jan 2013, 05:08 PM
Hi Ady,
No, I can't reproduce this issue consistently. So I decided to check the context state before I use it.

Regards,
Adi
0
Ady
Telerik team
answered on 03 Jan 2013, 02:19 PM
Hello Andreas,

 What do you mean by 'check the context state'? Can you provide me with the code you are using so that I can verify if thats ok?

Kind regards,
Ady
the Telerik team
Q3'12 SP1 of OpenAccess ORM packs Multi-Table Entities mapping support. Check it out.
Tags
General Discussions
Asked by
adi
Top achievements
Rank 1
Answers by
Ady
Telerik team
adi
Top achievements
Rank 1
Share this question
or