SQL-Server2019 Win10 21H2

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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQL-Server2019 Win10 21H2

Post by marsupilami »

Addendum: If you want your database conenctions to survive a short disconnect, you might want to do experiments with the Zeos Proxy Server that is included in Zeos 8. You should know that I never tested it with OLEDB and MS SQL Server though. ;)
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

Re: SQL-Server2019 Win10 21H2

Post by nlanger »

I get the Error1, in the error handling, when ZQuery.Open.
Error2 also appears later.

cause in the source text ...
ZAbstractRODataset.pas
function TZAbstractRODataset.CreateResultSet(const SQL: string; MaxRows: Integer): IZResultSet;
Line 3516 else Result := Statement.ExecuteQueryPrepared;

ZAbstractDataset.pas
function TZAbstractRWTxnUpdateObjDataSet.CreateResultSet(const SQL: string; MaxRows: Integer): IZResultSet;
Line 1072: Result := inherited CreateResultSet(SQL, MaxRows);

ZDbcOleDB.pas
procedure TZOleDBConnection.HandleErrorOrWarning(..)
Line 916: then Sender.ReleaseImmediat(Sender, EZSQLConnectionLost(Error))

ZDbcOleDBStatement.pas
procedure TZOleDBPreparedStatement.ReleaseImmediat(const Sender: IImmediatelyReleasable; var AError: EZSQLConnectionLost);
Line 1861: inherited ReleaseImmediat(Sender, AError);

procedure TZAbstractOleDBStatement.ReleaseImmediat(..)
Line 686: ClearCallResultCache;

procedure TZAbstractOleDBStatement.ClearCallResultCache;
Line 547: for I := 0 to FCallResultCache.Count -1 do

here is => FCallResultCache=nil

Norbert
You do not have the required permissions to view the files attached to this post.
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQL-Server2019 Win10 21H2

Post by marsupilami »

Hello Norbert,

I added the SQLState 08S02 to the list of SQLStates that generate an connection loss error. Could you please check if this works for you?

Best regards,

Jan
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

Re: SQL-Server2019 Win10 21H2

Post by nlanger »

Hello Jan

that only partially helps. "Zquery.Open" now comes with ZConn.OnLost :D

The first error (Error1.jpg) still occurs at exactly this point (See attachement) ...

ZDbcOleDBStatement.pas
procedure TZAbstractOleDBStatement.ClearCallResultCache;
Line 547: for I := 0 to FCallResultCache.Count -1 do
=> because the FCallResultCache is NIL.

But the error only comes here:
ZAbstractRODataset.pas
procedure TZAbstractRODataset.InternalInitFieldDefs;
...
=> ResultSet := CreateResultSet(FSQL.Statements[0].SQL, 0);

Cause: ZQuery.GetFieldNames()
Since this is usually the first call in the dialog.

Norbert
You do not have the required permissions to view the files attached to this post.
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 798
Joined: 18.11.2018, 17:37
Location: Hungary

Re: SQL-Server2019 Win10 21H2

Post by aehimself »

marsupilami wrote: 06.07.2022, 08:08But I have doubts wether this will fix your problems.
Yep. Didn't help :(
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
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQL-Server2019 Win10 21H2

Post by marsupilami »

aehimself wrote: 09.07.2022, 18:35
marsupilami wrote: 06.07.2022, 08:08But I have doubts wether this will fix your problems.
Yep. Didn't help :(
Just to be sure - it is the thing over here? viewtopic.php?f=37&t=152220
marsupilami
Platinum Boarder
Platinum Boarder
Posts: 1956
Joined: 17.01.2011, 14:17

Re: SQL-Server2019 Win10 21H2

Post by marsupilami »

nlanger wrote: 09.07.2022, 13:05 that only partially helps. "Zquery.Open" now comes with ZConn.OnLost :D
So that works as it should now.
nlanger wrote: 09.07.2022, 13:05 ZDbcOleDBStatement.pas
procedure TZAbstractOleDBStatement.ClearCallResultCache;
Line 547: for I := 0 to FCallResultCache.Count -1 do
=> because the FCallResultCache is NIL.
I fixed that one. Since FCallResultCache is set to nil in the end we also can check if it already is nil.
nlanger wrote: 09.07.2022, 13:05 But the error only comes here:
ZAbstractRODataset.pas
procedure TZAbstractRODataset.InternalInitFieldDefs;
...
=> ResultSet := CreateResultSet(FSQL.Statements[0].SQL, 0);

Cause: ZQuery.GetFieldNames()
Since this is usually the first call in the dialog.
I am not sure what to do here. Is this fixed by the other fix?

If there are other problems: Could you try to create a small test case?
User avatar
aehimself
Zeos Dev Team
Zeos Dev Team
Posts: 798
Joined: 18.11.2018, 17:37
Location: Hungary

Re: SQL-Server2019 Win10 21H2

Post by aehimself »

marsupilami wrote: 11.07.2022, 08:09Just to be sure - it is the thing over here? viewtopic.php?f=37&t=152220
Yes, that is the nasty one. Reading the whole thread back makes it funny how much progress was already made compared to the initial state.

Anyway, I'll jump out from this thread as I'm being completely offtopic here. I was just hopeful, that's all :)
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
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

Re: SQL-Server2019 Win10 21H2

Post by nlanger »

First => ZQuery.GetFieldNames()

No, that's the same error, I wrote the process upside down.
I'll try the new version later.

Norbert
nlanger
Junior Boarder
Junior Boarder
Posts: 27
Joined: 14.10.2020, 21:56

Re: SQL-Server2019 Win10 21H2

Post by nlanger »

Hello Jan

Yes, now there are no more access violations when changing the WLAN. Everything perfect.

Thanks
Norbert
Post Reply