Click here to Skip to main content
15,910,981 members
Home / Discussions / C#
   

C#

 
QuestionObject as database Pin
nemopeti17-Oct-06 22:56
nemopeti17-Oct-06 22:56 
AnswerRe: Object as database Pin
Christian Graus17-Oct-06 23:02
protectorChristian Graus17-Oct-06 23:02 
GeneralRe: Object as database Pin
nemopeti17-Oct-06 23:17
nemopeti17-Oct-06 23:17 
Question2 Sql Server Process ID created for 1 query. Pin
coby cai17-Oct-06 22:56
professionalcoby cai17-Oct-06 22:56 
AnswerRe: 2 Sql Server Process ID created for 1 query. Pin
Mike Dimmick18-Oct-06 1:14
Mike Dimmick18-Oct-06 1:14 
GeneralRe: 2 Sql Server Process ID created for 1 query. Pin
coby cai18-Oct-06 17:11
professionalcoby cai18-Oct-06 17:11 
QuestionCompare dates Pin
Mamphekgo17-Oct-06 22:45
Mamphekgo17-Oct-06 22:45 
AnswerRe: Compare dates Pin
Christian Graus17-Oct-06 22:48
protectorChristian Graus17-Oct-06 22:48 
Questionhow can i select text from .chm file through C# Pin
sikandarhayat17-Oct-06 22:28
sikandarhayat17-Oct-06 22:28 
Questionsending file over MSMQ in C#.net Pin
nmandaliya17-Oct-06 21:59
nmandaliya17-Oct-06 21:59 
Questionformating (erease) USB Stick Pin
Martin#17-Oct-06 21:47
Martin#17-Oct-06 21:47 
QuestionProblem abt threading!! Pin
samtam17-Oct-06 21:31
samtam17-Oct-06 21:31 
AnswerRe: Problem abt threading!! Pin
Guffa17-Oct-06 21:47
Guffa17-Oct-06 21:47 
GeneralRe: Problem abt threading!! Pin
samtam17-Oct-06 22:04
samtam17-Oct-06 22:04 
AnswerRe: Problem abt threading!! Pin
Guffa17-Oct-06 22:11
Guffa17-Oct-06 22:11 
GeneralRe: Problem abt threading!! Pin
samtam17-Oct-06 22:16
samtam17-Oct-06 22:16 
AnswerRe: Problem abt threading!! Pin
Guffa17-Oct-06 22:25
Guffa17-Oct-06 22:25 
GeneralRe: Problem abt threading!! Pin
samtam17-Oct-06 23:24
samtam17-Oct-06 23:24 
its not possible to send u the whole code related to this coz its too long so only sending u chunks from it,i hope it will help u to understand our problem

//this method is called after every 10 seconds by timer event
public void ConnectDB(Object obj, EventArgs ev)
{
myTimer.Stop();

String query = "/////////////some selection from DB";
aReader = DB.ExecuteReader(query);
projectDB.Clear();
while (aReader.Read())
{
//structure is a Struct containing a string and an int variable
//after gettings latest values from db in structure v add it
// in projectDB arraylist
structure.proj_name = aReader.GetString(0);
structure.compl_status = aReader.GetInt32(1);

//to lock the projectDB array list here
Monitor.Enter(projectDB);

projectDB.Add(structure);

//to unlock the projectDB arraylist here
Monitor.Exit(projectDB);

}

DB.Close();


if (!list_status.Contains(s))//some check i think u dnt need to understand it
{
exit_flag = true;//to disable timer
}
else
{
myTimer.Enabled = true;//to enable timer
}
}


another method of the same class that is using value of this arraylist
///////////////code where v r reading values from projectDB
if (Monitor.TryEnter(projectDB))
{
//projectDB is an arraylist filled with info from database

temp_projDB = (compile_status)projectDB[index];
}
else
continue;

//////////////////
Thanks
AnswerRe: Problem abt threading!! Pin
Guffa18-Oct-06 1:57
Guffa18-Oct-06 1:57 
Questionuninstalling windows services Pin
DownBySpj17-Oct-06 21:17
DownBySpj17-Oct-06 21:17 
AnswerRe: uninstalling windows services Pin
sundar15618-Oct-06 8:15
sundar15618-Oct-06 8:15 
QuestionReflections Pin
ParagGupta17-Oct-06 20:59
ParagGupta17-Oct-06 20:59 
AnswerRe: Reflections Pin
Nader Elshehabi17-Oct-06 21:16
Nader Elshehabi17-Oct-06 21:16 
QuestionNeed to know about prolog connectivity with C# application Pin
Ahsanzm17-Oct-06 20:43
Ahsanzm17-Oct-06 20:43 
QuestionParent-Child Forms : MDI Pin
IamHuM17-Oct-06 20:38
IamHuM17-Oct-06 20:38 

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.