Click here to Skip to main content
16,015,900 members
Home / Discussions / C#
   

C#

 
QuestionSynchronization with C# Pin
Lilla8823-Apr-06 2:37
Lilla8823-Apr-06 2:37 
AnswerRe: Synchronization with C# Pin
Graham Nimbley24-Apr-06 13:39
Graham Nimbley24-Apr-06 13:39 
QuestionGenerate documentation Pin
JensB23-Apr-06 1:40
JensB23-Apr-06 1:40 
AnswerRe: Generate documentation Pin
CWIZO23-Apr-06 2:54
CWIZO23-Apr-06 2:54 
AnswerRe: Generate documentation Pin
Graham Nimbley24-Apr-06 13:43
Graham Nimbley24-Apr-06 13:43 
QuestionGetting error: There is already an open DataReader associated with this Command which must be closed first. Pin
emran83423-Apr-06 0:21
emran83423-Apr-06 0:21 
AnswerRe: Getting error: There is already an open DataReader associated with this Command which must be closed first. Pin
Guffa23-Apr-06 0:56
Guffa23-Apr-06 0:56 
Answerit's a ADO.NET limitation ! Pin
e_akhras23-Apr-06 5:09
e_akhras23-Apr-06 5:09 
the exception you're getting is probably when executing SQLCommands using "ExecuteDataReader" and openning the datareader while another data reader is already opened in another thread.

example of creating the exception:

thread 1 executes:
SqlDataReader dr = LocalSqlCommand.ExecuteDataRead();
dr.Open();
...

in the same time thread 2 tries to execute the same symmantec:

SqlDataReader dr = LocalSqlCommand.ExecuteDataRead()
dr.Open() -> this will generate the exception...


its a .NET limitation to open only one DataReader per application !!!

a workaround:
- always close the dataReader when finished by executing: dr.Close()
- try raising a flag between threads (mutex) so they block each other while they open and close DataReaders

best regards
AnswerRe: it's a ADO.NET limitation ! Pin
Guffa23-Apr-06 5:38
Guffa23-Apr-06 5:38 
GeneralRe: it's a ADO.NET limitation ! Pin
emran83423-Apr-06 8:42
emran83423-Apr-06 8:42 
GeneralRe: it's a ADO.NET limitation ! Pin
e_akhras24-Apr-06 1:51
e_akhras24-Apr-06 1:51 
GeneralRe: it's a ADO.NET limitation ! Pin
emran83423-Apr-06 8:50
emran83423-Apr-06 8:50 
Generaltwo articles Pin
e_akhras24-Apr-06 2:27
e_akhras24-Apr-06 2:27 
Questionwin application datagrid editting. Pin
moomoori22-Apr-06 22:38
moomoori22-Apr-06 22:38 
Questionoperator overloading in C# Pin
pankajgarg1222-Apr-06 21:50
pankajgarg1222-Apr-06 21:50 
AnswerRe: operator overloading in C# Pin
Guffa22-Apr-06 22:21
Guffa22-Apr-06 22:21 
Questionunmanaged code Pin
pankajgarg1222-Apr-06 21:48
pankajgarg1222-Apr-06 21:48 
AnswerRe: unmanaged code Pin
CWIZO22-Apr-06 23:45
CWIZO22-Apr-06 23:45 
AnswerRe: unmanaged code Pin
Zakaria Bin Abdur Rouf25-Apr-06 3:44
Zakaria Bin Abdur Rouf25-Apr-06 3:44 
QuestionDynamically accessing web service Pin
DotNet novice22-Apr-06 20:33
DotNet novice22-Apr-06 20:33 
AnswerRe: Dynamically accessing web service Pin
Guffa22-Apr-06 21:26
Guffa22-Apr-06 21:26 
GeneralRe: Dynamically accessing web service Pin
DotNet novice23-Apr-06 4:02
DotNet novice23-Apr-06 4:02 
AnswerRe: Dynamically accessing web service Pin
Guffa25-Apr-06 4:14
Guffa25-Apr-06 4:14 
Questionhelp files CHM Pin
picasso222-Apr-06 17:37
picasso222-Apr-06 17:37 
AnswerRe: help files CHM Pin
Ed.Poore22-Apr-06 19:29
Ed.Poore22-Apr-06 19:29 

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.