Hi everyone,
I am usеing ZEOSDBO-6.6.6-stable.
I am trying to set a param of TZStoredProc with this code:
TZStoredProc.ParamByName('MyDATE').asString:= '';
this generates Conversion error. In the firebird stored procedure, parameter 'MyDate' is of type Timestamp. The same problem i have with integers too.
any ideas?
thanks!
problem with TZStoredProc
Moderators: gto, EgonHugeist
solved partially ...
I thing the problem is in procedure TZAbstractRODataset.SetStatementParams, specially this part:
i thing that looking for cases of Param.Datatype undermines useing type conversions like:
ParamByName(Integer Parameter).asString ...
Code: Select all
if Param.IsNull then begin
Statement.SetNull(I + 1, ConvertDatasetToDbcType(Param.DataType))
end else begin
case Param.DataType of
ftBoolean:
Statement.SetBoolean(I + 1, Param.AsBoolean);
ftSmallInt:
Statement.SetShort(I + 1, Param.AsSmallInt);
ftInteger, ftAutoInc:
Statement.SetInt(I + 1, Param.AsInteger);
................
ParamByName(Integer Parameter).asString ...