Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call a Sproc with parameters.
Message
From
23/12/2004 11:52:45
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
How to call a Sproc with parameters.
Miscellaneous
Thread ID:
00971830
Message ID:
00971830
Views:
58
Hello everyone,

I have been asked to implement the following signature :-
public int ExecuteScalar(string storedProcedureName, System.Data.SqlClient.SqlParameter[] parameters)
{

}
I presume that the SqlParameter array must be populated in the calling code. The task is to create five records in a SQL database with four columns. Could anyone give me an example of how to create the calling code that builds up the SqlParameter array parameter?

This is an example of the sproc,
dbo.InsertEmployee 'HARRISON', 'ANGIE', 'PROGRAMMER', 'IT'
Assuming that I get the array passed into the ExecuteScalar method, how do you you call the SQLCommand so that the array is used?

I know I am asking a lot but I have looked through the help all day and I cannot find anything that explains how to do this?

Thank you so much!

Angie.
Next
Reply
Map
View

Click here to load this message in the networking platform