谁有成熟的中间层源代码?(200分)

  • 主题发起人 主题发起人 donggang_cn1
  • 开始时间 开始时间
up
是不是都是给email,有没有人收到啊
我也要
xmuzxs@hotmail.com
 
function THiteker.FExecProc
(
const psHosID, psIpAdd, psProcName : WideString;
psParam : OleVariant;
out poParam : OleVariant
): OleVariant;
var
spExec : TStoredProc;
iLoop : Integer;
iParamCount1, iParamCount2 : Integer;
//传入参数个数,传出参数个数(不含po_iResult)
sErrMsg : String;
begin
Result := -1;
spExec := TStoredProc.Create(application);
Try
Try
iParamCount1 := VarArrayHighBound(psParam, 1);
With spExecdo
begin
Close;
DatabaseName := 'DataBase1';
StoredProcName := UpperCase(psProcName);
Prepare;
iParamCount2 := ParamCount - iParamCount1 - 2;
poParam := VarArrayCreate([0, iParamCount2-1], VarOleStr);
for iLoop := 0 to iParamCount1do
begin
Params[iLoop].AsString := psParam[iLoop];
end;

//
ExecProc;
For iLoop := 0 To iParamCount2-1do
begin
poParam[iLoop] := Trim(Params[iParamCount1 + 1 + iLoop].AsString);
end;
sErrMsg := Params[iParamCount1 + iParamCount2].AsString;
//提示信息
Result := Params[iParamCount1 + iParamCount2 + 1].AsInteger;
//返回值
end;
WriteLog(psHosID, psIpAdd, sErrMsg);
Except
on E:Exceptiondo
begin
sErrMsg := '《' + psProcName + '》执行失败〖' + E.Message + '〗';
WriteLog(psHosID, psIpAdd, sErrMsg);
end;
end;
Finally
spExec.Free;
end;
end;
 
后退
顶部