During some tests I did because of problems with transactions, I encountered that the ado-component opens a new session to the ms sql-db every time a select-statement is done.
Line 177 in ZDbcAdoStatement.pas
Code: Select all
if IsSelect(SQL) then
begin
AdoRecordSet := CoRecordSet.Create;
AdoRecordSet.MaxRecords := MaxRows;
AdoRecordSet.Open(SQL, (Connection as IZAdoConnection).GetAdoConnection,
adOpenStatic, adLockOptimistic, adAsyncFetch);
end
else
AdoRecordSet := (Connection as IZAdoConnection).GetAdoConnection.Execute(SQL, RC, adExecuteNoRecords);
Our problem is, that we want to set the lock_timeout, and as this is used for each session seperated, we have to set it manually befor each select sql.
That's not really as it should be. As we ported some programs to ms sql because a customer wants it, we are in a bit of hurry and don't have so much time to test and rebuild our program (till now we used BDE and Sybase-DB where everything worked fine).
Our ZEOSlib Version is 6.6.1 beta