var
AP : TADOStoredProc;
WERT : int64;
begin
// AP.Create, Connection setzen BlaBla
// dann:
WERT := IrgendEin64BitInteger;
AP.ProcedureName := '
SP_DUMMY';
AP.Parameters.Clear;
// und hier knallt es:
AP.Parameters.CreateParameter('
PARA',ftLargeint,pdInput, 0,WERT);
...
// und zwar in Unit ADODB:
function TParameters.CreateParameter(
const Name: WideString;
DataType: TDataType; Direction: TParameterDirection; Size: Integer;
Value: OleVariant): TParameter;
begin
Result := AddParameter;
Result.FParameter := Create_Parameter(
Name, DataType, Direction, Size);
{ Don't try to assign value when it is an EmptyParam (used when optional) }
if not ((TVarData(Value).VType = varError)
and
(TVarData(EmptyParam).VError = $80020004))
then
Result.FParameter.Value := Value;
// <--- genau da macht es Peng ?!
end;