TMSStoredProc - passing parameters by name

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 5
Joined: Tue 24 Aug 2010 10:28

TMSStoredProc - passing parameters by name

Post by Zelius » Fri 04 Mar 2016 11:33

Is it possible to pass stored procedure parameters by name instead of by index (default behaviour) for TMSStoredProc? As i see, i can pass parameters by name only in TMSQuery, but it does not support automatic generation of SQL with named pairs of parameters, something like exec Test @Param = :Param (it is our best practice to avoid parameter's confusion)
Best regards, Konstantin

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

Re: TMSStoredProc - passing parameters by name

Post by azyk » Mon 07 Mar 2016 09:57

In the SQL query generated by TMSStoredProc, parameters for calling the stored procedure will be sent ordered by index. If you need to pass parameters in another order, you can generate such SQL query by yourself and and assign it as a value for the TMSStoredProc.SQL.Text property.

Post Reply