读取/更新以访问数据库 [英] Read/Update to Access DB

查看:70
本文介绍了读取/更新以访问数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用C#和MS Access进行简单的数据库编程.好吧,我对数据库方面的知识还很陌生.

我的数据库:

学生桌
ID FIRST_NAME LAST_NAME ADDRESS CONTACT_NO. EMAIL_ADD

我的问题:
1)什么是最有效的方式来读取/更新访问数据库中的表?
2)我需要根据ID进行搜索,如何在db中搜索?是否需要将表加载到DataSet并进行搜索?否则
3)搜索之后,我将编辑这些列,以及如何更新该特定ROW的特定COLUMN.

也许有些人可能认为这个问题看起来像是汤匙喂食",如果是这样的话,请向我推荐一些不错的网站,作为学习DB知识的好地方,你们遇到了这些网站.

我的搜索无法帮助我找到一个很好的答案.

谢谢.
Skunkhead:)

Hi guys,

I''m working on simple database programming using C# and MS Access. Well i''m very new to database kind of stuffs.

My DB:

Student Table
ID FIRST_NAME LAST_NAME ADDRESS CONTACT_NO. EMAIL_ADD

My questions:
1)What is the most efficient way to read/update the table in access db?
2)I need to search according to the ID, how I need to search in the db?Do I need to load the table to DataSet and do the searching or else?
3)After search, I will EDIT the columns, and how to UPDATE that particular COLUMN of that particular ROW.

Maybe some of you might think that this question looks sort of "spoon-feeding", if that so, kindly suggest me some good websites which you guys came across as a good place to learn DB stuffs.

My search couln''t help me to find a good answers for this.

Thanks.
Skunkhead :)

推荐答案

1.关于CP的许多文章 http://www.codeproject.com/KB/database/#ADO.NET [ ^ ],例如为初学者使用ADO.NET [
1. There are many articles on CP http://www.codeproject.com/KB/database/#ADO.NET[^], for example Using ADO.NET for beginners[^]

2. Select * from StudentTable where ID = [insert the id you want to search here]

3. Update what? are you asking SQL question or data access? for sql
<br />
UPDATE StudnetTable<br />
set First_name = ''Joe''<br />
where ID = [insert the id you want to search here]<br />



如果您有关于数据访问的问题,可以在本教程中找到答案.



If your question is about data access, you will find your answer in the tutorial.


这篇关于读取/更新以访问数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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