Click here to Skip to main content
15,796,886 members
Home / Discussions / C#
   

C#

 
QuestionSynchronization with C# Pin
Lilla8823-Apr-06 3:37
Lilla8823-Apr-06 3:37 
AnswerRe: Synchronization with C# Pin
Graham Nimbley24-Apr-06 14:39
Graham Nimbley24-Apr-06 14:39 
QuestionGenerate documentation Pin
JensB23-Apr-06 2:40
JensB23-Apr-06 2:40 
AnswerRe: Generate documentation Pin
CWIZO23-Apr-06 3:54
CWIZO23-Apr-06 3:54 
AnswerRe: Generate documentation Pin
Graham Nimbley24-Apr-06 14:43
Graham Nimbley24-Apr-06 14:43 
QuestionGetting error: There is already an open DataReader associated with this Command which must be closed first. Pin
emran83423-Apr-06 1:21
emran83423-Apr-06 1:21 
AnswerRe: Getting error: There is already an open DataReader associated with this Command which must be closed first. Pin
Guffa23-Apr-06 1:56
Guffa23-Apr-06 1:56 
Answerit's a ADO.NET limitation ! Pin
e_akhras23-Apr-06 6:09
e_akhras23-Apr-06 6: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 6:38
Guffa23-Apr-06 6:38 
GeneralRe: it's a ADO.NET limitation ! Pin
emran83423-Apr-06 9:42
emran83423-Apr-06 9:42 
GeneralRe: it's a ADO.NET limitation ! Pin
e_akhras24-Apr-06 2:51
e_akhras24-Apr-06 2:51 
GeneralRe: it's a ADO.NET limitation ! Pin
emran83423-Apr-06 9:50
emran83423-Apr-06 9:50 
Generaltwo articles Pin
e_akhras24-Apr-06 3:27
e_akhras24-Apr-06 3:27 
Questionwin application datagrid editting. Pin
moomoori22-Apr-06 23:38
moomoori22-Apr-06 23:38 
Questionoperator overloading in C# Pin
pankajgarg1222-Apr-06 22:50
pankajgarg1222-Apr-06 22:50 
AnswerRe: operator overloading in C# Pin
Guffa22-Apr-06 23:21
Guffa22-Apr-06 23:21 
Questionunmanaged code Pin
pankajgarg1222-Apr-06 22:48
pankajgarg1222-Apr-06 22:48 
AnswerRe: unmanaged code Pin
CWIZO23-Apr-06 0:45
CWIZO23-Apr-06 0:45 
AnswerRe: unmanaged code Pin
Zakaria Bin Abdur Rouf25-Apr-06 4:44
Zakaria Bin Abdur Rouf25-Apr-06 4:44 
QuestionDynamically accessing web service Pin
DotNet novice22-Apr-06 21:33
DotNet novice22-Apr-06 21:33 
AnswerRe: Dynamically accessing web service Pin
Guffa22-Apr-06 22:26
Guffa22-Apr-06 22:26 
GeneralRe: Dynamically accessing web service Pin
DotNet novice23-Apr-06 5:02
DotNet novice23-Apr-06 5:02 
AnswerRe: Dynamically accessing web service Pin
Guffa25-Apr-06 5:14
Guffa25-Apr-06 5:14 
Questionhelp files CHM Pin
picasso222-Apr-06 18:37
picasso222-Apr-06 18:37 
AnswerRe: help files CHM Pin
Ed.Poore22-Apr-06 20:29
Ed.Poore22-Apr-06 20: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.