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
stBytes: if (FColumnLengths[ColumnIndex] <= 0) or (FColumnLengths[ColumnIndex] = MaxInt)
then Result := TZRowAccessorBytesLob.CreateWithDataAddess(PZVarLenDataRef(TempBlob), zCP_Binary, ConSettings, FOpenLobStreams)
else goto Fail;
because the value of FColumnLengths[ColumnIndex] is 1073741823.
It seems to me that you need to add a check for this value in ZDbcResultSetMetadata.pas:
marsupilami wrote: ↑28.03.2023, 14:57
Could you please test if it works?
Yes, now its ok, thanks.
I'll add more so I don't create a new topic.
When ZConnection.Reconnect or after lost connection I do ZQuery.Close and ZQuery.Open. And If query has parameters, then an error occurs, because query text is garbled. I think that TZAbstractDBLibStatement = class(TZRawParamDetectPreparedStatement) does not follow the procedure TZRawParamDetectPreparedStatement.GetRawEncodedSQL(const SQL: SQLString): RawByteString when Query.Open again. So TZQuestionMarkBindList(BindList)[InParamCount].QMarkPosition value don't updated. And in module ZDbcDbLibStatement.pas code SQLWriter.AddText(P+LastPos, QMarkBindValue.QMarkPosition - LastPos, Result) add wrong string because QMarkBindValue.QMarkPosition value is 0.
Code forexample, use mssql protocol type:
ZQuery.Close;
ZQuery.SQL.Text := 'select id from tmp_table where id = :id';
ZQuery.ParamByName('id').AsInteger := 1;
ZQuery.Open;
ZConnection.Reconnect;
ZQuery.Close;
ZQuery.Open;
P.S.
And I want to copy ZMemTable without data. i suggest to add parameter to copy data. Attached patch for example. Thanks.
You do not have the required permissions to view the files attached to this post.
brick08 wrote: ↑29.03.2023, 08:19
When ZConnection.Reconnect or after lost connection I do ZQuery.Close and ZQuery.Open. And If query has parameters, then an error occurs, because query text is garbled. I think that TZAbstractDBLibStatement = class(TZRawParamDetectPreparedStatement) does not follow the procedure TZRawParamDetectPreparedStatement.GetRawEncodedSQL(const SQL: SQLString): RawByteString when Query.Open again. So TZQuestionMarkBindList(BindList)[InParamCount].QMarkPosition value don't updated. And in module ZDbcDbLibStatement.pas code SQLWriter.AddText(P+LastPos, QMarkBindValue.QMarkPosition - LastPos, Result) add wrong string because QMarkBindValue.QMarkPosition value is 0.
Code forexample, use mssql protocol type:
ZQuery.Close;
ZQuery.SQL.Text := 'select id from tmp_table where id = :id';
ZQuery.ParamByName('id').AsInteger := 1;
ZQuery.Open;
ZConnection.Reconnect;
ZQuery.Close;
ZQuery.Open;
I think we fixed that one. Could you please check if the current revision of Zeos 7.3 from SVN works? Github should be updated tomorrow.
brick08 wrote: ↑29.03.2023, 08:19
And I want to copy ZMemTable without data. i suggest to add parameter to copy data. Attached patch for example. Thanks.