ADOQUERY1 := TADOQuery.Create(nil);
try
with ADOQUERY1 do
begin
begin
Connection :=Self.Connection;
SQL.Text := ' DECLARE @ErrorMsg VARCHAR(100) ' //存储过程信息
+' EXEC sp_UpDataSM_FabricRemain_Out '
+' '''+ sStockOutID + ''', '
+' '''+ sIsPost + ''', '
+' '''+ sType_OutDye+''','
+' @ErrorMsg OUTPUT ' ;
end;
Connection.Errors.Clear;
Connection.BeginTrans;
Close;
ExecSQL;
if Connection.Errors.Count >0 then
raise Exception.Create(Connection.Errors.Item[0].Description);
Connection.CommitTrans;
FreeAndNil(ADOQUERY1);
end;
except On E:Exception do
begin
if E.Message<>'' then
SystemError(E.Message,0)
else
ShowMessage('操作过程出错,请重试!');
ADOQUERY1.Connection.RollbackTrans;
// Result := False;
FreeAndNil(ADOQUERY1);
end;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货