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'm using some input and output params in a PL/SQL anonymous block and I'm seeing some strange issues. It appears that ptInput params that are strings need to be ftWideString type, but ptOutput params need to be ftString type (or they come out as incorrectly encoded strings with embedded #0 (utf16 as ansi basically.)) Using ptInputOutput params are also affected (and I don't think there's a workaround since they have to be ftWideString on input and ftString on output.) Here's a console program that shows the issue. It won't error, but will show the incorrect encoding of "ParamOut". Uncomment the indicated line to see the other error. I'm thinking that this is a bug, but wanted to check here before creating a ticket.
thank's for the details. Seems all the features i made are not perfect @all.
Should by fixed by https://sourceforge.net/p/zeoslib/code-0/6972/.
Please report your findings.
Btw. It's a bad practice using Variable types (strings/bytes) without spezify the maximum size for drivers like Oracle. OCI is still not able to describe the parameter. Thus ZDBC is doing some guesswork now and uses the OCI max limit of 4000*BytesPerChar + Length indicator. In case of "utf8mb4" it's a amount of ~16kb for both parameters. JFYI
// Just testing "returning into" clause which can be used on insert, update or delete statements.
ZQuery.SQL.Text := 'DELETE FROM EMP WHERE EMPNO = 1 RETURNING ENAME INTO :BIND3';
Param := ZQuery.ParamByName('BIND3');
Param.ParamType := ptOutput;
Param.DataType := ftString;
Param.Size := 200;
ZQuery.ExecSQL;
This fails with: Cannot retrieve Resultset data and doesn't seem to be datatype specific (if I try to return empno i get the same error.)
Thank you for the new fix related to the RETURNING INTO clause! Tested and verified the fix. I've also noticed one other issue. If a stored procedure has a VARCHAR2 parameter, the "paramcheck" TParam DataType will be defined as ftWideMemo (which seems correct since they could be 32k max.) However if that type isn't changed before executing it will result in:
SQL Error: ORA-01458: invalid length inside variable character string
Note: This probably isn't worth mentioning, but using Param.AsString := 'blah'; will reset the Param.DataType to ftWideString so to test with an initial value set the Param.Value directly. Thanks again!