Click here to Skip to main content
15,908,842 members
Home / Discussions / C#
   

C#

 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Vimalsoft(Pty) Ltd17-Nov-09 4:35
professionalVimalsoft(Pty) Ltd17-Nov-09 4:35 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Abhijit Jana17-Nov-09 4:48
professionalAbhijit Jana17-Nov-09 4:48 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Vimalsoft(Pty) Ltd17-Nov-09 4:50
professionalVimalsoft(Pty) Ltd17-Nov-09 4:50 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Abhijit Jana17-Nov-09 5:58
professionalAbhijit Jana17-Nov-09 5:58 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
dan!sh 17-Nov-09 5:58
professional dan!sh 17-Nov-09 5:58 
AnswerRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Dave Kreskowiak17-Nov-09 4:51
mveDave Kreskowiak17-Nov-09 4:51 
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Vimalsoft(Pty) Ltd17-Nov-09 4:54
professionalVimalsoft(Pty) Ltd17-Nov-09 4:54 
AnswerRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
PIEBALDconsult17-Nov-09 5:40
mvePIEBALDconsult17-Nov-09 5:40 
Yeah, what they said.

You should go further and Open the Connection before each use and Close it afterward (preferably in a finally).

You can also check the Connection's State and Open it if needed -- that's what I do.

(Working with DataReaders makes this a little more difficult because you have to hold the Connection open and remember to Close it later.)
GeneralRe: ExecuteReader requires an open and available Connection. The connection's current state is closed. Pin
Vimalsoft(Pty) Ltd18-Nov-09 20:14
professionalVimalsoft(Pty) Ltd18-Nov-09 20:14 
QuestionProblem while Parsing DateTime. Pin
Sunil G 317-Nov-09 3:33
Sunil G 317-Nov-09 3:33 
AnswerRe: Problem while Parsing DateTime. Pin
musefan17-Nov-09 3:40
musefan17-Nov-09 3:40 
GeneralRe: Problem while Parsing DateTime. Pin
Sunil G 317-Nov-09 3:52
Sunil G 317-Nov-09 3:52 
AnswerRe: Problem while Parsing DateTime. Pin
Luc Pattyn17-Nov-09 3:49
sitebuilderLuc Pattyn17-Nov-09 3:49 
AnswerRe: Problem while Parsing DateTime. Pin
Alan N17-Nov-09 4:24
Alan N17-Nov-09 4:24 
QuestionCOMBO BOX ISSUE Pin
spankyleo12317-Nov-09 2:57
spankyleo12317-Nov-09 2:57 
AnswerRe: COMBO BOX ISSUE Pin
musefan17-Nov-09 3:01
musefan17-Nov-09 3:01 
GeneralRe: COMBO BOX ISSUE Pin
musefan17-Nov-09 3:10
musefan17-Nov-09 3:10 
GeneralRe: COMBO BOX ISSUE Pin
EliottA17-Nov-09 3:15
EliottA17-Nov-09 3:15 
GeneralRe: COMBO BOX ISSUE Pin
musefan17-Nov-09 3:17
musefan17-Nov-09 3:17 
GeneralRe: COMBO BOX ISSUE Pin
ragnaroknrol17-Nov-09 5:56
ragnaroknrol17-Nov-09 5:56 
GeneralRe: COMBO BOX ISSUE Pin
musefan17-Nov-09 6:21
musefan17-Nov-09 6:21 
GeneralRe: COMBO BOX ISSUE [modified] Pin
spankyleo12317-Nov-09 22:22
spankyleo12317-Nov-09 22:22 
GeneralRe: COMBO BOX ISSUE Pin
musefan17-Nov-09 22:44
musefan17-Nov-09 22:44 
GeneralRe: COMBO BOX ISSUE Pin
spankyleo12317-Nov-09 23:46
spankyleo12317-Nov-09 23:46 
GeneralRe: COMBO BOX ISSUE Pin
musefan18-Nov-09 0:03
musefan18-Nov-09 0:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.