如何使用c#.net创建sql脚本进行插入或更新? [英] How to create sql script using c# .net for insert or update?
问题描述
您好,
如何使用c#.net创建sql脚本以进行插入或更新?
我想使用c#.net windows应用程序创建用于插入和更新sql表的sql脚本。
我想,如果数据不在数据库中,那么数据应插入,否则数据应根据日期更新,使用c#.net windows应用程序单击事件。
我想在所有表格中创建一个脚本。
所以,请帮助我。 紧急。
先谢谢你。
Ankit Agarwal
软件工程师
Hello,
How to create sql script using c# .net for insert or update?
I want to create sql script for insert and update sql tables using c# .net windows application.
I want to, If data is not in the database, so data should be insert otherwise data should be updated according to date, On single click event using c# .net windows application.
I want to create one script at a time of all tables.
So, Please help me. It's urgent.
Thank you in Advance.
Ankit Agarwal
Software Engineer
推荐答案
这是一些可用的选项。选择最适合您或谷歌使用c#代码生成数据库脚本。祝你好运。
http://stackoverflow.com/questions/11656324/how-can-i-generate-create-table-script-from-code [ ^ ]
http://stackoverflow.com/questions/12140422/generating-sql-script-通过代码-c网 [ ^ ]
http://stackoverflow.com/questions/1695738/programmatically-generate-script-for-all-objects-in-a-database [ ^ ]
This are some of the options available. Select the best suitable to you or google using "c# code to generate database script". Good luck.
http://stackoverflow.com/questions/11656324/how-can-i-generate-create-table-script-from-code[^]
http://stackoverflow.com/questions/12140422/generating-sql-script-through-code-c-net[^]
http://stackoverflow.com/questions/1695738/programmatically-generate-script-for-all-objects-in-a-database[^]
我认为你需要这个: OpenDBiff [ ^ ]
这篇关于如何使用c#.net创建sql脚本进行插入或更新?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!