stored procedure initialization & call generates 3 unneeded commands

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

stored procedure initialization & call generates 3 unneeded commands

Post by Ludek » Thu 14 Apr 2016 07:24

hi,
following code (especially the line with storedprocname :=)

Code: Select all

  sp := TMSStoredProc.Create(nil);
  sp.Connection := amsconnection;
  sp.StoredProcName := 'dbo.somestoredsp';
generates 2 commands in the profiler log:

Code: Select all

SET NO_BROWSETABLE OFF
exec [tt].[sys].sp_procedure_params_100_rowset N'somestoredsp',1,N'dbo',NULL
the execution then reverts the NO_BROWSETABLE flag back to ON.

is there a way to get rig of those 3 weird commands? it slows down much the execution of stored procedures...

Thanks for tips, Ludek.

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

Re: stored procedure initialization & call generates 3 unneeded commands

Post by azyk » Thu 28 Apr 2016 14:02

Please let us know the script creating the stored procedure. We need to know whether the procedure has parameters, and if yes, what are they?

Post Reply