如何在C#中同时更新多个表 [英] how to update multiple table at the same time in c#

查看:124
本文介绍了如何在C#中同时更新多个表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在c#中同时更新多个表? 我想一次在所有表中使用一个字段来更新4个表的数据..
我怎么能.. ???

how to update multiple table at the same time in c#??
i want to update 4 tables data at a time where one field is comman in all tables..??
how i can..???

推荐答案

您要更新数据库包,HTML表...吗?

如果您要查询数据库表,因为您需要一口气更新几个表,那么请看一下ADO.NET事务..

在ADO.NET中使用事务 [
Are you updating database tbales, HTML tables...?

If you are inquiring about database tables, as in you need to update several tables in one go, then have a look at ADO.NET transactions..

Using Transactions in ADO.NET[^]


hi,
在这种情况下,您可以做以下两件事..
1.您可以使用或创建StoredProcedure并编写您的sql语句以一次将数据插入到多个表中.

根据我的第二种方式,您可以在圆台上创建触发器以进行插入.

请访问以获取更多信息

http://www.upsizing.co.uk/Art18_CascadeTriggers.aspx [

in this case u can do following two things..
1. u can use or make StoredProcedure and write your sql statement to insert the data to multiple table at a single time.

and the second way according to me, u can create trigger on perticular table for insert.

visit for more info

http://www.upsizing.co.uk/Art18_CascadeTriggers.aspx[]

hope this help..


嗨soniya,

您还可以使用存储过程更新多个表.
只需点击以下链接,希望对您有所帮助.

更新多个表 [
hi soniya,

you can update multiple tables with a stored procedure also.
Just follow the below link ,i hope it helps you.

Updating Multiple Tables[^]

If you have any query for me, just make a comment or question.


这篇关于如何在C#中同时更新多个表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆