BUG REPORT:Passing NULL params
Moderators: gto, cipto_kh, EgonHugeist
-
- Fresh Boarder
- Posts: 8
- Joined: 01.09.2005, 20:43
- Location: Igreja Evangélica Assembléia de Deus em PE
BUG REPORT:Passing NULL params
TZStoredproc or TZQuery does not execute when there are params with NULL values fith Firebird, raising "parameter mismatch" error.
-
- Fresh Boarder
- Posts: 8
- Joined: 01.09.2005, 20:43
- Location: Igreja Evangélica Assembléia de Deus em PE
Hi All,
Think I Found where the bug is...
But I dont know how to send the correction.. ( can anyone help/teach me me ?)
so, I'm sendind the simple change I did on ZStoredProcedure.pas:
procedure TZStoredProc.SetStatementParams(Statement: IZPreparedStatement;
ParamNames: TStringDynArray; Params: TParams; DataLink: TDataLink);
var
I: Integer;
Param: TParam;
Stream: TStream;
begin
for I := 0 to Params.Count - 1 do
begin
Param := Params;
if Params.ParamType in [ptResult, ptOutput] then
Continue;
if Param.IsNull then
// THIS LINE DOES NOT WORK:
// Statement.SetNull(I, ConvertDatasetToDbcType(Param.DataType));
// CORRECT LINE:
Statement.SetNull(I+1, ConvertDatasetToDbcType(Param.DataType));
else begin
case Param.DataType of
ftBoolean:
..........
Thanks !
Jennecy
Think I Found where the bug is...
But I dont know how to send the correction.. ( can anyone help/teach me me ?)
so, I'm sendind the simple change I did on ZStoredProcedure.pas:
procedure TZStoredProc.SetStatementParams(Statement: IZPreparedStatement;
ParamNames: TStringDynArray; Params: TParams; DataLink: TDataLink);
var
I: Integer;
Param: TParam;
Stream: TStream;
begin
for I := 0 to Params.Count - 1 do
begin
Param := Params;
if Params.ParamType in [ptResult, ptOutput] then
Continue;
if Param.IsNull then
// THIS LINE DOES NOT WORK:
// Statement.SetNull(I, ConvertDatasetToDbcType(Param.DataType));
// CORRECT LINE:
Statement.SetNull(I+1, ConvertDatasetToDbcType(Param.DataType));
else begin
case Param.DataType of
ftBoolean:
..........
Thanks !
Jennecy