pb中使用bcp问题
//首先判断文件内容是否为空
if ps_datafilename <> "" then
LengthA = FileLength( ps_datafilename)
if LengthA > 0 then
string vs_bcp
integer li_rc
vs_bcp = "bcp " + gsdatabase + "." + gsowner + "." + ps_tablename + " in " + ps_datafilename + " -c -k -S" + gsserver + " -U" + "" + gssauser + "" + " -P" + "" + gssapass + ""
OleObject wsh
CONSTANT integer MAXIMIZED = 3
CONSTANT integer MINIMIZED = 2
CONSTANT integer NORMAL = 1
CONSTANT boolean WAIT = TRUE
CONSTANT boolean NOWAIT = FALSE
wsh = CREATE OleObject
li_rc = wsh.ConnectToNewObject( "WScript.Shell" )
li_rc = wsh.Run(vs_bcp , 0, WAIT) //
end if
end if
return 1
-----以上脚本在我的环境中去连接服务器执行一点儿问题没有,但是在别人的机器上却有问题,不知什么原因?
[最优解释]
估计不是代码的问题,可能是环境的问题
[其他解释]
具体问题提示是什么?
[其他解释]
注册了没?regsvr32.exe
[其他解释]