Click here to Skip to main content
15,905,563 members
Home / Discussions / C#
   

C#

 
QuestionSystem.IO.Exception Pin
solutionsville12-Oct-07 13:53
solutionsville12-Oct-07 13:53 
AnswerRe: System.IO.Exception Pin
Dave Kreskowiak12-Oct-07 15:35
mveDave Kreskowiak12-Oct-07 15:35 
GeneralRe: System.IO.Exception Pin
solutionsville12-Oct-07 16:02
solutionsville12-Oct-07 16:02 
GeneralRe: System.IO.Exception Pin
Dave Kreskowiak12-Oct-07 17:00
mveDave Kreskowiak12-Oct-07 17:00 
GeneralRe: System.IO.Exception Pin
solutionsville12-Oct-07 17:07
solutionsville12-Oct-07 17:07 
GeneralRe: System.IO.Exception Pin
Dave Kreskowiak13-Oct-07 3:01
mveDave Kreskowiak13-Oct-07 3:01 
AnswerRe: System.IO.Exception Pin
solutionsville13-Oct-07 9:44
solutionsville13-Oct-07 9:44 
QuestionProblem with launching an external process Pin
Togakangaroo12-Oct-07 10:44
Togakangaroo12-Oct-07 10:44 
Hi, I am trying to write a console program that among other things will use the sqlplus utility to run PL/SQL script in a file.
To this end I have the following bit of code:
<pre>
static void execute(string command, string args, int timeout, string process_title)
{
System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo(command, args);
psi.RedirectStandardOutput = true;
psi.UseShellExecute = false;
System.Diagnostics.Process ps;
try
{
ps = System.Diagnostics.Process.Start(psi);

if(!ps.WaitForExit(timeout))
{
try
{
ps.Kill();
}
catch(Exception e)
{
log("Error while trying to terminate process");
log("Error: "+e.Message);
}
throw new Exception(process_title+" operation has timed out.");
}
}
catch(Exception e)
{
log("Error Running "+process_title);
throw e;
}
}
</pre>
However when I run
execute("sqlplus", @"mylogin/mypassword@sid @filepath", 50000, "my process");
I get a timeout, even if the file only contains a simple and small select clause.
Any ideas?
I suspect this is not sqlplus related since running
execute("dir", @"C:\", 1000, "dir");
results in a "The system cannot find the file specified" error

AnswerRe: Problem with launching an external process Pin
Ennis Ray Lynch, Jr.12-Oct-07 11:28
Ennis Ray Lynch, Jr.12-Oct-07 11:28 
AnswerRe: Problem with launching an external process Pin
Daniel Grunwald12-Oct-07 23:53
Daniel Grunwald12-Oct-07 23:53 
AnswerRe: Problem with launching an external process Pin
Togakangaroo15-Oct-07 4:34
Togakangaroo15-Oct-07 4:34 
AnswerRe: Problem with launching an external process Pin
Togakangaroo15-Oct-07 7:09
Togakangaroo15-Oct-07 7:09 
QuestionButton Questions Pin
C# Beginner Nick12-Oct-07 10:08
C# Beginner Nick12-Oct-07 10:08 
AnswerRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:13
Kristian Sixhøj12-Oct-07 10:13 
GeneralRe: Button Questions Pin
C# Beginner Nick12-Oct-07 10:16
C# Beginner Nick12-Oct-07 10:16 
GeneralRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:17
Kristian Sixhøj12-Oct-07 10:17 
GeneralRe: Button Questions Pin
User 665812-Oct-07 10:52
User 665812-Oct-07 10:52 
GeneralRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:57
Kristian Sixhøj12-Oct-07 10:57 
AnswerRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:21
Kristian Sixhøj12-Oct-07 10:21 
GeneralRe: Button Questions Pin
C# Beginner Nick12-Oct-07 10:46
C# Beginner Nick12-Oct-07 10:46 
GeneralRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:47
Kristian Sixhøj12-Oct-07 10:47 
GeneralRe: Button Questions Pin
C# Beginner Nick12-Oct-07 10:53
C# Beginner Nick12-Oct-07 10:53 
GeneralRe: Button Questions Pin
Kristian Sixhøj12-Oct-07 10:56
Kristian Sixhøj12-Oct-07 10:56 
GeneralRe: Button Questions Pin
C# Beginner Nick12-Oct-07 14:57
C# Beginner Nick12-Oct-07 14:57 
Question.NET 2 writing to Hard Disk on C# program startup Pin
liambreen12-Oct-07 9:52
liambreen12-Oct-07 9:52 

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.