我正在寻求关于c#和访问数据库的帮助 [英] I am seeking help regarding c# and access database

查看:79
本文介绍了我正在寻求关于c#和访问数据库的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好。我需要关于我的小项目的帮助..我已经建立了一个访问数据库,其中我有10个字段。我已经在我的c#窗体中放置了10个文本框,我必须在每个文本框中输入0和1的值,并且这些值将使用该数据库内容进行验证,因为我已经建立了连接字符串。但令我震惊的是,我将如何使用存储在数据库表字段中的值验证每个文本框的值。

任何人都可以帮忙吗?



Thnx

Hi. I need help regarding my small project..i have made a database in access in which i have 10 fields. I have placed 10 textboxes in my c# windows form and there i have to enter the values in each text box as 0 and 1 and these values are to be verified with that database contents as i have already made the connection string. But i am struck that how I am going to verify each textbox''s value with the value stored in the field of database table.
Can anyone help??

Thnx

推荐答案

编写一个选择查询以从表中检索所有记录。

然后运行一个循环并将这些记录与文本框中输入的内容进行比较。
Write a select query to retrieve all the records from the tables.
Then run a loop and compare these records against what has been entered in the textbox.


我尝试了一个查询来搜索,但它可以解决问题。
I have tried a query to search but it dint work out.


如果你请给我一个简单的例子???
If u may kindly give me a simple example???


这篇关于我正在寻求关于c#和访问数据库的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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