- The parameter initialization when the param value is null has a wrong index. It says:
Code: Select all
[...]
if Param.IsNull then
Statement.SetNull(I, ConvertDatasetToDbcType(Param.DataType))
[...]
but it should be:
Code: Select all
[...]
if Param.IsNull then
Statement.SetNull(I+1, ConvertDatasetToDbcType(Param.DataType))
[...]
- The ftFixedChar field type is not handled. Due to this wrong SQL statements are generated for certain s-p calls (missing parameters). This type should be added to the ftString case. The lines:
Code: Select all
[...]
ftString:
Statement.SetString(I+1, Param.AsString);
[...]
should be rewriten as:
Code: Select all
[...]
ftString, ftFixedChar:
Statement.SetString(I+1, Param.AsString);
[...]
Added to this, I think that the case statement should have an else case firing an exception for unhandled field types. That would make obvious where the problem lies, instead of delaying the problem to the execution of the s-p.
I'm using the trunk version, but the file is identical in the testing branch.
Thanks,
Och