我在安装了Oracle客户端11g的Windows 7中运行了以下代码。 SQL Loader日志文件表示成功加载了10行,但退出代码在某些计算机上返回4 - 致命错误。究竟是什么问题?请指教。
Public Shared Function RunSQLLoader(ByVal intImportID As Integer, ByVal strFilePath As String) As Boolean
Dim wsh As Object = CreateObject("WScript.Shell")
Dim waitOnReturn As Boolean = True
Dim windowStyle As Integer = 0
Dim exitCode As Integer
exitCode = wsh.Run("sqlldr control=\\server\folder\upload.ctl data=\\server\folder\file.txt log=server\folder\file.log", windowStyle, waitOnReturn)
If exitCode = 0 Then
Return True
Else
ExecuteError(intImportID, "SQL Loader Command Failure", "Fail to upload " & strFilePath & " with an exit code: " & exitCode)
Return False
End If
End Function