插入更新和删除记录 [英] To insert update and delete records
本文介绍了插入更新和删除记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好
我有一个问题,我想设计一个页面,其中必须插入所有数据以进行更新和删除.数据必须存储在sql server中.我已经为此创建了一个表,任何人都可以帮助我如何为此创建存储过程以及c#代码以插入更新和删除数据.
Hello
I have a question, i want to design a page in which all the data has to be inserted updated and deleted. The data has to be stored in sql server. i have created a table for that, can anyone help me for how to create a stored procedure for this and c# code to inset update and delete data.
推荐答案
存储过程(存储过程)通常是捆绑到单个逻辑单元中的Transact-SQL
语句的有序序列.
它们允许变量和参数,以及选择和循环构造.
关键是存储过程存储在数据库中,而不是存储在单独的文件中.
要使用C#调用存储过程,请参考:
更新/使用存储过程和SqlDataSource控件插入/删除 [通过存储过程ASP.NET C#插入单个值 [ ^ ]
使用ASP.NET的存储过程 [插入,更新和使用网格视图和ObjectDataSource删除 [ Google [<
Stored procedures (sprocs) are generally an ordered series ofTransact-SQL
statements bundled into a single logical unit.
They allow for variables and parameters, as well as selection and looping constructs.
A key point is that sprocs are stored in the database rather than in a separate file.
To call stored procedures in C#, please refer:
Update/Insert/Delete with stored procedures and SqlDataSource control[^]
Insert Single Value With Stored Procedure ASP.NET C#[^]
Stored Procedures with ASP.NET[^]
Insert,Update and Delete Using Grid View and ObjectDataSource[^]
And the best one:
Google[^]
Prasad Kulkarni先生的回答是完美的.您可以参考以了解如何创建存储过程.如果您想了解如何使用C#/ADO.NET使用这些存储过程,那么这可能会很有用.
了解ADO.NET的初学者教程 [ ^ ]
注意:即使使用自动生成的代码和/或ORM,学习ADO.NET也是一个好主意.
The answer by Mr. Prasad Kulkarni is perfect. you can refer that to see how to create stored procedures. If you want to understand how to use C#/ADO.NET to use these stored procedures then perhaps this could be useful.
A Beginner''s Tutorial for Understanding ADO.NET[^]
Note: It is always a good idea to learn ADO.NET even if you are using auto generated code and/or ORMs.
您好
为此,您只编写了一个存储过程
在这里找到这个关节..
http://www.c-sharpcorner .com/UploadFile/rohatash/select-insert-update-delete-using-stored-procedure-in-sql/ [
Hello
For that you have write only one store procedure
here find this articels..
http://www.c-sharpcorner.com/UploadFile/rohatash/select-insert-update-delete-using-stored-procedure-in-sql/[^]
If any query fill free to contact
Thank You
这篇关于插入更新和删除记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文