asp.net网页调用Oracle的sqlldr失败,但是在cmd手动打可以执行
小弟最近做一个C#Web程序,需要调用oracle的sqlldr进行文本文件的大批量导入(10万行数据),但是cmd手动 打入sqlldr lxh/lxh@lxh 111.ctl”都是导入成功,但程序调用却不报错,但是也没有执行
我的C#程序是这样的
System.Diagnostics.Process p = new System.Diagnostics.Process();
p.StartInfo = new System.Diagnostics.ProcessStartInfo();
p.StartInfo.FileName = "sqlldr";
p.StartInfo.Arguments = string.Format("{0} \"{1}\"", "lxh/lxh@lxh", "111.txt");
p.StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.CreateNoWindow = true;
p.Start();
StreamReader sr = p.StandardOutput;
string info, result = "";
while ((info = sr.ReadLine()) != null && !sr.EndOfStream)
result += info;
Response.Write( result );
都没有类似"达到提交点,逻辑记录计数49” 语句出现
注:我所用的服务器是用windows2003操作系统,网上查有人用XP可以,但我没有试过
请哪位大家帮忙一下,谢谢