





























When you use TableAdapters in C#, VS generates INSERT, SELECT and UPDATE etc commands for you.
Other commands can be added by going into DataSet Designer and adding commands via the Add SQL Wizard.
Sometimes, however, you need additional SQL commands that contain a complete list of all the fields in the DataSet. You would also like these lists to be automatically updated whenever a change is made to the Database.
The code presented here does this by using functions in the Designer code to generate such strings.
Download demo project and source - 31 Kb
---
http://www.codeproject.com/useritems/GenerateSQL.asp
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。