更新时间:10-08 (学大教育)提供原创文章
摘要:本文首先介绍了SNDP次期化开发项目的背景与现实意义,并对本次开发新增的两个功能TableAdapter和TransactionScope进行了简单介绍。
TableAdapter提供应用程序和数据库之间的通信。更具体地说,TableAdapter 连接到数据库,执行查询或存储过程,并返回用返回数据填充的新数据表或是用返回数据填充现有 DataTable。TableAdapter 还用于将更新数据从应用程序发送回数据库。
TransactionScope 类提供一个简单方法,通过这一方法,可以不必与事务本身交互,即可将代码块标记为参与某个事务。事务范围可以自动选择和管理环境事务。因此在开发事务应用程序时使用 TransactionScope 类,更易于使用并且效率很高。
然后就本次参与开发的TableAdapter功能做了详细介绍,给出了使用环境,并通过应用实例对TableAdapter的生成和使用方法进行了较为详细的说明,同时给出了使用TableAdapter注意事项。
最后对此次参与的开发工作做了总结,并指出了有待进一步改进的问题。
【关键字】SNDP,TableAdapter,TransactionScope,Visual Studio,.NET Framework,SDT.NET
Abstract:This paper firstly introduces the background and significance of the SNDP re-development project, and two new functions added in this project in brief which are TableAdapter and TransactionScope.
TableAdapters provide communication between your application and a database. More specifically, a TableAdapter connects to a database, executes queries or stored procedures, and either returns a new data table populated with the returned data or fills an existing DataTable with the returned data. TableAdapters are also used to send updated data from your application back to the database.
The TransactionScope class provides a simple way to mark a block of code as participating in a transaction, without requiring you to interact with the transaction itself. A transaction scope can select and manage the ambient transaction automatically. Due to its ease of use and efficiency, it is recommended that you use the TransactionScope class when developing a transaction application.
Some application examples about how to use this function, as well as matters need paying attention to are demonstrated.
Then the next part tells the TableAdapter function which I had participated in and did some work. It gives the operating environment, a detailed description of how to generate and use TableAdapter by application examples and use precautions.
Finally, it summarizes this re-development work and personally harvest and figures out some problems need to improve.
【keywords】SNDP,TableAdapter,TransactionScope,Visual Studio,.NET Framework,SDT.NET