Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating, Inserting into a table with a lot of columns
Message
 
 
To
29/09/2010 18:36:25
General information
Forum:
ASP.NET
Category:
Databases
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01483278
Message ID:
01483280
Views:
39
>In an app I'm developing, I'm using stored procedures to update and create new records for a table.
>There are lots and lots of columns in this table and it will grow as the app matures.
>I'm creating the command to call to the stored procedure and adding the parameters, one by one.
>That's a LOT of typing.
>
>Looking at Bonnie's blog, I found some code that will generate the parameters and values for me.
>Will that work if the generated parameters are not in the same sequence as they are declared in the stored procedure?
>
>Any other ideas to cut down on the typing?

It depends on how you're invoking the procedure. If you invoke with the named parameters, then the order of the parameters does not matter. If you invoke with the placeholders (?), then the order of the parameters can not be changed.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform