Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to call a Sproc with parameters.
Message
From
23/12/2004 15:28:52
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00971830
Message ID:
00971913
Views:
18
>
>public int ExecuteScalar(string storedProcedureName, System.Data.SqlClient.SqlParameter[] parameters)
>{
>
>}
>
>
>dbo.InsertEmployee 'HARRISON', 'ANGIE', 'PROGRAMMER', 'IT'
>
You need to know the parameter names:

SqlParameter[] params;

params[0] = new SqlParameter("@Param1","Harrison",SqlDbType.Char);
params[1] = new SqlParameter("@Param2","Angie",SqlDbType.Char);
params[2] = new SqlParameter("@Param3","Programmer",SqlDbType.Char);
params[3] = new SqlParameter("@Param4","It",SqlDbType.Char);


Or something similar.

BOb
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform