Hi!
To reproduce it place on form
MSConnection
MSQuery
Set MSQuery1.Options.NonBocking := True
Set MSQuery1.SQL.Text any SELECT query
Add code below in button on click and execute the code
TThread.CreateAnonymousThread(
procedure
begin
CoInitialize(nil);
try
MSQuery1.Close;
MSQuery1.Open;
finally
CoUninitialize;
end;
end).Start;
set debug point on MSQuery1.Close and run (F9) in debug mode, on first executing (click button) this code it's ok but on second executing (click button) you will see error 'Not enough timers available' on line 'MSQuery1.Close'.
This problem happened in CRTimer unit in code
procedure TCRTimer.UpdateTimer;
begin
KillTimer(FWindowHandle, 1);
if (FInterval <> 0) and FEnabled and Assigned(FOnTimer) then
if SetTimer(FWindowHandle, 1, FInterval, nil) = 0 then
raise EOutOfResources.Create(SNoTimers);
end;
What was changed in SDAC that components brings this error and how to fix it? Also, as I understand that NonBocking options is used especially for threads but now looks like NonBocking := false works good.
Thank you.
After migration from v9.4.3 to v10.0.2, SDAC raises error 'Not enough timers available' in thread
-
- Posts: 11
- Joined: Wed 01 Jun 2011 07:54
Re: After migration from v9.4.3 to v10.0.2, SDAC raises error 'Not enough timers available' in thread
Hi there,
Thank you for contacting Devart!
When the NonBocking option is enabled, row fetching is performed on a separate thread.
Since your entire request is executed in a separate thread, you do not need to use NonBocking mode.
More details about NonBocking mode here:
https://docs.devart.com/sdac/devart.sda ... ocking.htm
Let us know if you have any other questions!
Thank you for contacting Devart!
When the NonBocking option is enabled, row fetching is performed on a separate thread.
Since your entire request is executed in a separate thread, you do not need to use NonBocking mode.
More details about NonBocking mode here:
https://docs.devart.com/sdac/devart.sda ... ocking.htm
Let us know if you have any other questions!
-
- Posts: 11
- Joined: Wed 01 Jun 2011 07:54
Re: After migration from v9.4.3 to v10.0.2, SDAC raises error 'Not enough timers available' in thread
Thank you! Yes, NonBlocking := False works well.
Re: After migration from v9.4.3 to v10.0.2, SDAC raises error 'Not enough timers available' in thread
Hi,
Thank you for your reply! I was happy to assist you!
In case you have any further questions about our products, please feel free to contact us any time!
Best regards,
Sergey
Thank you for your reply! I was happy to assist you!
In case you have any further questions about our products, please feel free to contact us any time!
Best regards,
Sergey