VS2010 asp.net: executing parameter less stored proc to update record -


i execute stored proc updates record. @ point keep parameter less. in future, adding parameters stored proc. can via sqldatasource? save me writing few lines of code execute stored proc in traditional ado.net. if possible, please supply me sample code?

thanks

you use system.data.sqlclient.sqlcommand

something this...

sqlcommand command = new sqlcommand("p_updatesomething",  connectionstring); command.commandtype = commandtype.storedprocedure; command.executenonquery(); 

or using sqldatasource like

<asp:sqldatasource id="sqlds" runat="server" updatecommand="pupdatesomething" updatecommandtype="storedprocedure"></asp:sqldatasource> 

update parameters can added sqldatasource.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -