Click here to Skip to main content
15,887,952 members
Home / Discussions / C#
   

C#

 
AnswerRe: right click for multi shapes on picturBox Pin
Christian Graus9-Aug-08 16:24
protectorChristian Graus9-Aug-08 16:24 
QuestionHow to access the explicit interface implementation of a base class from a dervied class ? Pin
MarkPhB9-Aug-08 6:05
MarkPhB9-Aug-08 6:05 
AnswerRe: How to access the explicit interface implementation of a base class from a dervied class ? Pin
Frank Horn9-Aug-08 6:36
Frank Horn9-Aug-08 6:36 
GeneralRe: How to access the explicit interface implementation of a base class from a dervied class ? Pin
MarkPhB9-Aug-08 7:07
MarkPhB9-Aug-08 7:07 
GeneralRe: How to access the explicit interface implementation of a base class from a dervied class ? Pin
J4amieC9-Aug-08 7:41
J4amieC9-Aug-08 7:41 
AnswerRe: How to access the explicit interface implementation of a base class from a dervied class ? Pin
J4amieC9-Aug-08 7:48
J4amieC9-Aug-08 7:48 
AnswerRe: How to access the explicit interface implementation of a base class from a dervied class ? Pin
DaveyM699-Aug-08 8:22
professionalDaveyM699-Aug-08 8:22 
Questionmulti threading problem??? Pin
mr.mohsen9-Aug-08 6:02
mr.mohsen9-Aug-08 6:02 
hi i have two thread that run two different methods.
in both methods i write a code that read a data from database.
for reading data from database i use sqlDataReader object.
assume two below area code:
first method(for first thread):
cmd.commandText="sql query";
sqldatareader dr=cmd.executereader();
if(dr.Hasrows)
{
dr.Read();

// in here i have a problem when another threads try to execute dr.Read() command of another methods
// because still this datareader object is not close. and the exception error is :
//"invalid try to read data. a datareader must be closed first."

}
dr.Close();
.........
second method(for second thread):
cmd.commandText="second sql query";
sqldatareader dr=cmd.executereader();
if(dr.Hasrows)
{
dr.Read();

// in here i have a problem when another threads try to execute dr.Read() command of another methods
// because still this datareader object is not close. and the exception error is :
//"invalid try to read data. a datareader must be closed first."

}
dr.Close();
-------------
please attention this two methods have completetly different code but in both of them should be read a data from database with sqldatareader. i need a class such as Monitor.Enter(Object) to lock this area codes but the problem is this two area codes are not in one method.
please tell me a solution.
thanks alot.

nobody help you...
you have to help you yourself
and this is success way.

AnswerRe: multi threading problem??? Pin
Frank Horn9-Aug-08 6:38
Frank Horn9-Aug-08 6:38 
GeneralRe: multi threading problem??? Pin
mr.mohsen9-Aug-08 11:20
mr.mohsen9-Aug-08 11:20 
GeneralRe: multi threading problem??? Pin
Mark Salsbery9-Aug-08 11:24
Mark Salsbery9-Aug-08 11:24 
GeneralRe: multi threading problem??? Pin
Mycroft Holmes9-Aug-08 14:11
professionalMycroft Holmes9-Aug-08 14:11 
QuestionGetting all Forms in the project Pin
mrcooll9-Aug-08 5:48
mrcooll9-Aug-08 5:48 
AnswerRe: Getting all Forms in the project Pin
Wendelius9-Aug-08 6:00
mentorWendelius9-Aug-08 6:00 
QuestionHow to get a particular number of bytes or a null terminated string from serial port? [modified] Pin
CelestialCoder9-Aug-08 4:42
CelestialCoder9-Aug-08 4:42 
AnswerRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
Searril9-Aug-08 5:00
Searril9-Aug-08 5:00 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder9-Aug-08 5:06
CelestialCoder9-Aug-08 5:06 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder12-Aug-08 1:56
CelestialCoder12-Aug-08 1:56 
GeneralRe: How to get a particular number of bytes or a null terminated string from serial port? Pin
CelestialCoder13-Aug-08 17:36
CelestialCoder13-Aug-08 17:36 
QuestionC# windows application deployment error Pin
vishnukamath9-Aug-08 3:40
vishnukamath9-Aug-08 3:40 
QuestionCounting number of characters Pin
Zafar Sultan9-Aug-08 3:35
Zafar Sultan9-Aug-08 3:35 
AnswerRe: Counting number of characters Pin
User 66589-Aug-08 4:43
User 66589-Aug-08 4:43 
QuestionMobile programming Pin
ali zaidi9-Aug-08 3:25
ali zaidi9-Aug-08 3:25 
AnswerRe: Mobile programming Pin
mr.mohsen9-Aug-08 6:09
mr.mohsen9-Aug-08 6:09 
QuestionOnchange event is not triggering events on text elements in c# Pin
Nupur2069-Aug-08 3:03
Nupur2069-Aug-08 3: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.