asp.net.ph

SqlCommandBuilder.DeriveParameters Method

System.Data.SqlClient Namespace   SqlCommandBuilder Class


Populates the specified SqlCommand object's Parameters collection with parameter information for a stored procedure specified in the SqlCommand.

[ VB ]
Public Shared Sub DeriveParameters ( _
   ByVal command As SqlCommand _
)

[ C# ]
public static void DeriveParameters (
   SqlCommand command
);

[ C++ ]
public: static void DeriveParameters (
   SqlCommand* command
);

[ JScript ]
public static function DeriveParameters (
   command : SqlCommand
);

Parameters

command
The SqlCommand referencing the stored procedure for which the parameter information is to be derived. The derived parameters will be populated into the Parameters of this command.

Exceptions


Exception Type Condition
InvalidOperationException The specified stored procedure does not exist.

Remarks

DeriveParameters overwrites any existing parameter information for the SqlCommand.

DeriveParameters requires an extra call to the data server to obtain the information. If the parameter information is known in advance, it is more efficient to populate the parameters collection by setting the information explicitly.

For more information, see Using Stored Procedures with a Command.

See Also

SqlCommandBuilder Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph