Hi..,
why are invoking the cmd.exe.., no need to invoke the cmd.exe, you can directly invoke the sqlldr.exe to load data..
here am changing your code .., this is not tested. you have to debug in your pc .
Dim proc As System.Diagnostics.Process = New System.Diagnostics.ProcessDim myCommand As String = "sqlldr.EXE"
proc.StartInfo = New ProcessStartInfo(myCommand)'Set up arguments for CMD.EXE'bytReturn = WshShell.Run("sqlldr " & strUser & "/" & strDatabasePassword & "@pwb_stg parfile=../parm/all.par errors=0", normal, wait)proc.StartInfo.Arguments = "PWBIMP@PWB_DEV/2010_MUU_ImpTest CONTROL=uhc_excl_ctl.txt"
proc.StartInfo.RedirectStandardInput = Falseproc.StartInfo.RedirectStandardOutput = Trueproc.StartInfo.RedirectStandardError = Trueproc.StartInfo.UseShellExecute = Falseproc.StartInfo.WorkingDirectory = "P:\CPD\CESP\parm"
Tryproc.Start()proc.WaitForExit(2000)If (proc.ExitCode = 0) Then'MsgBox.Show("Successfully Inserted")MsgBox("Successfully Inserted")ElseMsgBox(proc.StandardError.ReadToEnd)End IfCatch ex As ExceptionMsgBox(ex.Message)
try it.,