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
I have a feeling that this is related to this bugfix.
The below code worked fine in my test application but throws the same "cannot retrieve resultset" exception in my real application.
TZAbstractRODataset.ExecSQL -> TZStoredProc.SetStatementParams says that Params.Count is 9, however I have only one parameter.
Exception is raised in TZAbstractRODataset.ExecSQL -> TZAbstractRODataset.RetrieveParamValues -> TZAbstractCallableStatement.IsNull -> TZAbstractPreparedStatement.IsNull -> TZAbstractPreparedStatement.ParamterIndex2ResultSetIndex. The cycle still sees the 9 parameters, retrieves the first one without issues but throws the exception in the second round... which is expected, as we have only one parameter.
I'll see if I can dig deeper.
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
To answer my original question:
The setter method of StoredProcName triggers a metadata lookup. This lookup will automatically collect and update the .Params property of the TZStoredProc object. If you add parameters first and then update the procedure name, your previously created parameters will be omitted.
I also issued a pull request to fix the schema / catalog consideration, see here.
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