Call now: (800) 766-1884  


 SQL Server Tips
 SQL Server Training

 SQL Server Consulting
 SQL Server Support
 SQL Server Remote DBA

 SQL Server Scripts
 Scripts Menu




  SQL Server Tips by Gama and Naughter

Parameter Management


This returns the number of parameters passed to your XP.


This function is used to get the name of a parameter, which is passed, by name. Parameters to an XP can be passed by name or by position and you cannot mix the two at the same time. Passing a parameter by name is useful, when your XP can be called with a lot of parameters but most of the time default values can be used for the less used ones. Normally when your XP has only a few parameters you would pass then by position and would have no use for “srv_paramname”. Parameter indexes start at 1 so your code should be careful when you use C based indices which start at 0.


This is the corollary to the function srv_parname. It returns the index of a parameter given the parameter name. Again this function is only useful if the XP will pass it parameters by name.


This function returns information about a specific parameter. Information returned includes its ODS data type, Maximum Length, Actual Length, the data for the parameter and whether it is a null flag.


This function returns a value, which represents the “status” of a parameter. Currently only one status flag is defined. This is whether the parameter is a return parameter (i.e. defined in TSQL using “OUTPUT”)


This function allows the actual value of an OUTPUT parameter to be set from your XP.

The above book excerpt is from:

Super SQL Server Systems
Turbocharge Database Performance with C++ External Procedures

ISBN: 0-9761573-2-2
Joseph Gama, P. J. Naughter  


Burleson Consulting Remote DB Administration







Burleson is the America's Team

Note: The pages on this site were created as a support and training reference for use by our staff of DBA consultants.  If you find it confusing, please exit this page.

Errata?  SQL Server technology is changing and we strive to update our SQL Server support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:and include the URL for the page.

Burleson Consulting
SQL Server database support


Copyright © 1996 -  2013 by Vaaltech Web Services. All rights reserved.

Hit Counter