SQL-Server2019 Win10 21H2
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: SQL-Server2019 Win10 21H2
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.
Re: SQL-Server2019 Win10 21H2
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
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.
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: SQL-Server2019 Win10 21H2
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
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
Re: SQL-Server2019 Win10 21H2
Hello Jan
that only partially helps. "Zquery.Open" now comes with ZConn.OnLost
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
that only partially helps. "Zquery.Open" now comes with ZConn.OnLost
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.
Re: SQL-Server2019 Win10 21H2
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
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
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: SQL-Server2019 Win10 21H2
Just to be sure - it is the thing over here? viewtopic.php?f=37&t=152220
-
- Platinum Boarder
- Posts: 1956
- Joined: 17.01.2011, 14:17
Re: SQL-Server2019 Win10 21H2
So that works as it should now.
I fixed that one. Since FCallResultCache is set to nil in the end we also can check if it already is nil.
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?
Re: SQL-Server2019 Win10 21H2
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.marsupilami wrote: ↑11.07.2022, 08:09Just to be sure - it is the thing over here? viewtopic.php?f=37&t=152220
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
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
Re: SQL-Server2019 Win10 21H2
First => ZQuery.GetFieldNames()
No, that's the same error, I wrote the process upside down.
I'll try the new version later.
Norbert
No, that's the same error, I wrote the process upside down.
I'll try the new version later.
Norbert
Re: SQL-Server2019 Win10 21H2
Hello Jan
Yes, now there are no more access violations when changing the WLAN. Everything perfect.
Thanks
Norbert
Yes, now there are no more access violations when changing the WLAN. Everything perfect.
Thanks
Norbert