如何使用DataRow在表中插入数据(Access2007)C# [英] How to Use DataRow for Insert Data in To Table(Access2007) C#

查看:119
本文介绍了如何使用DataRow在表中插入数据(Access2007)C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用DataRow在表中插入数据(Access2007)

How to Use DataRow for Insert Data in To Table(Access2007)

推荐答案

插入将与我们对任何表或数据库相同。使用ADO.NET标准命令,可以创建/编辑/删除记录。

步骤:

1.打开连接(基于数据库会有所不同)

2.组建命令

3.向命令提供查询

4.使用您拥有的输入数据提供命令参数(是在datarow中? )

5.执行命令

6.关闭连接。



请试试。

以下文章将为您提供更多指导:

使用C#读取,插入,更新和删除简单的ADO.NET数据库。 [ ^ ]

创建&使用C#.net 中的Oledb从MSAccess-2007检索记录[ ^ ]
Insert will be same as we do for any table or database. Using ADO.NET standard commands, one can create/edit/delete the records.
Steps:
1. Open connection (will be different based on DB)
2. Form a command
3. Provide query to command
4. Provide parameters to command using the input data you have (is that in datarow?)
5. Execute command
6. Close connection.

Try out please.
Following articles will guide you more:
Simple ADO.NET Database Read, Insert, Update and Delete using C#.[^]
Creating & Retrieving records from M.S.Access-2007 using Oledb in C#.net[^]


这篇关于如何使用DataRow在表中插入数据(Access2007)C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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