如何获取数据集数据以更新数据库 [英] How do I get a Dataset data to update the database

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

问题描述

我正在使用c#express和sql express来创建我的程序。我已经建立了一个关系数据库,并使用不同风格的几种不同形式进行数据输入。我正在使用命名数据集,并且在将数据从数据集更新到
数据库时遇到问题。我尝试了几种不同的方法,包括使用endsit循环来更新数据库。我不断收到错误主键错误。我在编程方面已经很生疏20年了(我在
大学学习了C编程课程),但我没有做任何困难的事情,也不认为应该这么复杂。由于我有10个表单,如果可以的话,我不想为每个表单编写更新程序。我从microsoft文档中读到的信息似乎都没有工作

I am using c# express and sql express to create my program. I have set up a relational database and am using several different forms in different styles for data entry. I am using named datasets and having problems updating data from the datasets to the database. I have tried several different methods, including looping with endedit to update the database. I keep getting errors a duplicate primary key error. I am really rusty at programming having not done it for 20 years(I took a C programming course in University) but I am not doing anything that difficult and don't think it should be so complicated. As I have 10 forms, I don't want to write an update procedure for each but one if I can. None of the info I read from the microsoft documentation seems to work

推荐答案

您好CakeKing,

Hi CakeKing,

因为您的问题与数据平台开发更相关,我将把你的帖子转移到ADO.NET DataSet论坛以获得更有效的响应。

Since your question is more related with Data Platform Development, I'm going to move your post to the ADO.NET DataSet Forum for more efficient response.

感谢您的理解。

最诚挚的问候, 

Best Regards, 


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

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