use sp_executesql "on demand"

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 296
Joined: Thu 12 Oct 2006 09:34

use sp_executesql "on demand"

Post by Ludek » Thu 22 Oct 2015 14:57

I can see, queries without paremeters are executed directly, queries with parameters using sp_executesql. Is there a flag on a query to FORCE use sp_executesql? without adding dummy parameters? I would like it, as I could then nicely preserve some settings (like set transaction isolation level).
Or, do you have other idea to execute some query with other isolation level? only one query and nothing else? without dummy parameters and without other db connection? setting back to read uncommited at the end of query text is VERY unreliable, especially with fetchall = false.

Thanks, Ludek.

Devart Team
Posts: 1057
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: use sp_executesql "on demand"

Post by azyk » Tue 27 Oct 2015 10:20

SDAC doesn't use sp_executesql to execute a query with parameters but OLEDB Provider does. We cannot affect this behavior.

Post Reply