The offical for ZeosLib 7.3 Report problems, ask for help, post proposals for the new version of Zeoslib 7.3/v8
Quick Info:
-We made two new drivers: odbc(raw and unicode version) and oledb
-GUID domain/field-defined support for FB
-extended error infos of Firebird
-performance ups are still in queue
In future some more feature will arrive, so stay tuned and don't hassitate to help
procedure frxParamsToZParams(Query: TfrxCustomQuery; Params: TZParams);
var
i: Integer;
Item: TfrxParamItem;
begin
for i := 0 to Params.Count - 1 do
if Query.Params.IndexOf(Params[i].Name) <> -1 then
begin
Item := Query.Params[Query.Params.IndexOf(Params[i].Name)];
Params[i].Clear;
Params[i].DataType := Item.DataType;
{ Bound should be True in design mode }
if not (Query.IsLoading or Query.IsDesigning) then
Params[i].Bound := False
else
begin
if Item.Expression <> '' then
Params[i].Value := 0;
Params[i].Bound := True;
end;
if Trim(Item.Expression) <> '' then
if not (Query.IsLoading or Query.IsDesigning) then
if Query.Report <> nil then
begin
Query.Report.CurObject := Query.Name;
Item.Value := Query.Report.Calc(Item.Expression);
end;
if not VarIsEmpty(Item.Value) then
begin
Params[i].Bound := True;
if Params[i].DataType in [ftDate, ftTime, ftDateTime] then
Params[i].Value := Item.Value
else
Params[i].Value := Item.Value;
end;
end;
end;
I am not sure if it makes sense to make Bound writable. Zeos doesn't do anything with this information. This probably is why EgonHugeist made it Read Only. From a Zeos Point of View you just could skip writing to bound.
If we make bound writable we would need some functionality that depends on it. The documentation on Bound from Embarcadero says:
Datasets that represent queries and stored procedures use the value of Bound to determine whether to assign a default value for the parameter. If Bound is false, datasets that represent queries attempt to assign a value from the dataset indicated by their DataSource property. Similarly, when Bound is false, datasets that represent stored procedures attempt to supply a value directly from the server.
I am not sure what Zeos should do if one sets Bound to False on a TZQuery. Where should it get a default value from? For stored procedures we could check the meta data if there is a defauilt value there. But that also is nos implemented currently.
You can try to use .Value := null instead of .Bound.
If FastReport depends on .Bound you can disable ZParams in your project so it'll use the standard TParams instead.
Delphi 12.2, Zeos 8 from latest GIT snapshot
Using:
- MySQL server 8.0.18; libmysql.dll 8.0.40 x64 5.7.19 x68, libmariadb.dll 3.3.11
- Oracle server 11.2.0, 12.1.0, 19.0.0; oci.dll 21.15
- MSSQL 2012, 2019; sybdb.dll FreeTDS_3102
- SQLite 3.47