Click here to Skip to main content
15,909,652 members
Home / Discussions / C#
   

C#

 
QuestionProgrammatically get a PDF from a Reporting Service Pin
anderslundsgard24-Aug-09 20:25
anderslundsgard24-Aug-09 20:25 
AnswerRe: Programmatically get a PDF from a Reporting Service Pin
Giorgi Dalakishvili25-Aug-09 1:37
mentorGiorgi Dalakishvili25-Aug-09 1:37 
GeneralRe: Programmatically get a PDF from a Reporting Service Pin
anderslundsgard25-Aug-09 2:23
anderslundsgard25-Aug-09 2:23 
QuestionToolStripContainer ContentPanel visibility Pin
vhassan24-Aug-09 19:59
vhassan24-Aug-09 19:59 
Questionerror in code for data adapter Pin
myinstincts24-Aug-09 19:36
myinstincts24-Aug-09 19:36 
AnswerRe: error in code for data adapter Pin
Suresh Suthar24-Aug-09 19:49
professionalSuresh Suthar24-Aug-09 19:49 
AnswerRe: error in code for data adapter Pin
Ravi Kakumani24-Aug-09 21:09
Ravi Kakumani24-Aug-09 21:09 
QuestionThe work is done,why does Process.WaitForExit() still block the thread? Pin
Morven Huang24-Aug-09 19:32
Morven Huang24-Aug-09 19:32 
Hi everyone,

I run into a tricky issue when I run cmd.exe using Process class in C#.

1)Here's the C# code,it run the specified .bat file in command-line:

m_BasicDataProc = new Process();
m_BasicDataProc.StartInfo.FileName = "cmd.exe";
m_BasicDataProc.StartInfo.CreateNoWindow = false;
m_BasicDataProc.StartInfo.UseShellExecute = false;
m_BasicDataProc.StartInfo.RedirectStandardOutput = true;
m_BasicDataProc.StartInfo.RedirectStandardInput = true;
m_BasicDataProc.StartInfo.WorkingDirectory = Path.GetDirectoryName(batchFilePath);
m_BasicDataProc.Start();

string batchFileName = Path.GetFileName(batchFilePath);
string ipLine = batchFileName;StreamWriter inputStream = m_BasicDataProc.StandardInput;
inputStream.WriteLine(ipLine);
inputStream.Close();
m_BasicDataProc.WaitForExit();
m_BasicDataProc.EnableRaisingEvents = true;

2)In the .bat file,it calls a .vbs file with the content pretty much like this:

option explicit
dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim CreateFile
Set CreateFile = fso.CreateTextFile("InstallScripts\CreateTriggers.sql", true)

......
CreateFile.writeLine(strStatement)
CreateFile.WriteLine

set CreateFile = nothing
set fso = nothing


//
I found that the file CreateTriggers.sql was created successfully,it means that the work of this .bat file is finished,but it's really odd that the application is still blocked by the code line "m_BasicDataProc.WaitForExit();" and could not exit. Has anyone been in same situation?

Anything you could help would be appreciated!
AnswerRe: The work is done,why does Process.WaitForExit() still block the thread? Pin
Jimmanuel25-Aug-09 2:27
Jimmanuel25-Aug-09 2:27 
QuestionConverting Unmanaged Handle to Managed Control Pin
Ali Beirami24-Aug-09 18:13
Ali Beirami24-Aug-09 18:13 
AnswerRe: Converting Unmanaged Handle to Managed Control Pin
Christian Graus24-Aug-09 19:29
protectorChristian Graus24-Aug-09 19:29 
QuestionHow to create exe file? Pin
nudma24-Aug-09 18:09
nudma24-Aug-09 18:09 
AnswerRe: How to create exe file? Pin
padmanabhan N24-Aug-09 18:38
padmanabhan N24-Aug-09 18:38 
AnswerRe: How to create exe file? Pin
Christian Graus24-Aug-09 19:30
protectorChristian Graus24-Aug-09 19:30 
GeneralRe: How to create exe file? Pin
nudma25-Aug-09 4:29
nudma25-Aug-09 4:29 
AnswerRe: How to create exe file? Pin
Adam R Harris25-Aug-09 5:21
Adam R Harris25-Aug-09 5:21 
QuestionCascading Comboboxes... Pin
Illegal Operation24-Aug-09 14:07
Illegal Operation24-Aug-09 14:07 
AnswerRe: Cascading Comboboxes... Pin
N a v a n e e t h24-Aug-09 16:53
N a v a n e e t h24-Aug-09 16:53 
AnswerRe: Cascading Comboboxes... Pin
Prakash N24-Aug-09 21:39
Prakash N24-Aug-09 21:39 
Questionsolve eigen system in c# Pin
neha_rai24-Aug-09 13:56
neha_rai24-Aug-09 13:56 
AnswerRe: solve eigen system in c# Pin
Christian Graus24-Aug-09 14:06
protectorChristian Graus24-Aug-09 14:06 
GeneralRe: solve eigen system in c# Pin
neha_rai24-Aug-09 14:20
neha_rai24-Aug-09 14:20 
GeneralRe: solve eigen system in c# Pin
Christian Graus24-Aug-09 19:31
protectorChristian Graus24-Aug-09 19:31 
Answerdelete or edit "main report" button Pin
omidso24-Aug-09 11:08
omidso24-Aug-09 11:08 
GeneralRe: delete or edit "main report" button Pin
stancrm24-Aug-09 11:27
stancrm24-Aug-09 11:27 

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.