刷新新字段的数据集 [英] Refresh dataset for new fields
本文介绍了刷新新字段的数据集的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,我正在开发一个C#程序,该程序使用访问数据库来跟踪记录.因此,这里有数据库的数据集,并向数据库添加了新列. Visual Studio 2008 for C#不会刷新以将新列包括在我的数据集中.我尝试编辑设计器代码,但结果为零.
如何刷新数据集以在数据库中包括新添加的列?
在此先感谢您.
Hi, I am developing a C# program that uses an access database to track records. So here I am with a dataset for my database, and I add a new column to the database. Visual Studio 2008 for C# is not refreshing to include the new column in my dataset. I have tried editing the designer code, but that produces zero results.
How do you refresh a dataset to include a newly added column in your database?
Thanks in advance.
推荐答案
此处,您需要做的是,用单独的方法编写所有用于检索数据库值的代码,然后在Page_Load,Button_Click上调用此方法
以及您要更新数据库的任何地方.
希望对您有帮助.
祝你好运.
here what you need to do is, write the all code for retrieving the database value in separate method, then call this method on Page_Load, Button_Click
and wherever your database is getting updated.
hope it will help you.
best of luck.
这篇关于刷新新字段的数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文