I'm writing some stored procedures to do CRUD operations against some tables in a SQL Server database, which will be used in a FormView on an ASP.NET 2.0 page. I've already written the hardest one, which is the insert SP. Now I'm going to work on the select, update and delete SP's. What I'd like to know is, do the parameters to the SP's that are used by the SqlDataSou开发者_StackOverflow中文版rce have to be in exactly the same order? For example, the insert operation requires about a dozen parameters, all of which are stored into the 3 tables that the insert handles. However, to retrieve the same data, all I need is the primary keys, which are just 2 parameters. Do I need to provide all of the parameters, in the same order, as I've specified for the insertion stored procedure?
No. Each command will have separate parameter collections SqlDataSource.DeleteParameters
SSMS tools pack has a CRUD generator that might be useful too
精彩评论