访问数据库c#数据集的问题 [英] trouble with access database c# dataset

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

问题描述

亲爱的专家

我有一个Windows项目中的访问权限。你知道创建了一个数据集,并且像工具箱中的表适配器数据集一样生成了组件,我已经将其拖到表格和代码中,例如

Tableadaper1.fill(dataset.emp);



插入

Tableadapter1.Insert(Id,nm);



这显示在表格的数据网格上当表格加载Nd插入

我已经检查了访问权限,数据也达到了表格。

我已经使用ado命令参数等完成了所有这些,但是这是第一次我正在使用当你连接到db时创建的组件,如果我改变一些代码Nd调试它我插入的数据只是Nd如果我保持访问打开看看会发生什么



它显示Nd数据被删除的列中的#Error。对不起,如果在手机上有一些拼写错误。包含访问文件之前存在的数据保持不变。



我应该使用ado cmd.param.adwitval的东西还是可以使用这种方法节省编码工作量只有当数据没有像鬼一样被删除

解决方案

根据你的问题,在这里你会找到更好的解决方案,我们已经有类似的问题但是答案是也可以尝试搜索自己,最后你没有得到解决方案。然后问问,,,,快乐编码



https://mdsaputra.wordpress.com/2012/01/13/step-by-step-connect-to-访问数据库中-C-锋利/

Dear expert
I have acess db which is in a Windows project. You know a dataset is created and components generated like table adapter dataset in toolbox this I have dragged to form and code like
Tableadaper1.fill(dataset.emp);

For insert
Tableadapter1.Insert(Id,nm);

This is shown on data grid on form while form load Nd insert
I have checked in access also data reaches in table.
I have done all this using ado command parameters etc earlier several times but this is first time I'm using the components which get created when u connect to db now if I change some code Nd debug it the data I inserted just goes Nd if I keep access open to see what happens

It shows #Error in the columns Nd data gets deleted. Sorry if some typos on a mobile phone. The data which is present earlier to the inclusion of access file remains intact.

Should I use ado cmd.param.adwitval stuff or can I save coding effort using this method only if data does not get deleted like a ghost

解决方案

According to your question, here you will find better solution, we are already have similar kind of problems however answers are also available try to search your self, finally you are not getting solution. Then ask,,,,happy coding

https://mdsaputra.wordpress.com/2012/01/13/step-by-step-connect-to-access-database-in-c-sharp/


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

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