[fpc-devel] DatabaseError/DatabaseErrorFmt with Component parameter, TParams.GetByName

Michael Van Canneyt michael at freepascal.org
Wed Sep 28 10:57:14 CEST 2005



On Mon, 26 Sep 2005, Bram Kuijvenhoven wrote:

>
> or
>
> Function TParams.ParamByName(const Value: string): TParam;
> var
>   TmpDataset:TDataset;
> begin
>   Result:=FindParam(Value);
>   If (Result=Nil) then
>     begin
>     TmpDataSet:=DataSet;
>     if TmpDataSet<>nil then
>       DatabaseErrorFmt(SParameterNotFound,[Value],TmpDataset)
>     else
>       DatabaseErrorFmt(SParameterNotFound,[Value]);
>     end;
> end;

I'll implement this latter option.

Michael.



More information about the fpc-devel mailing list