Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to call a Sproc with parameters.
Message
De
23/12/2004 11:52:45
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
How to call a Sproc with parameters.
Divers
Thread ID:
00971830
Message ID:
00971830
Vues:
57
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform