c#DBSET和DataAdapter错误 [英] c# DBSET and DataAdapter error
本文介绍了c#DBSET和DataAdapter错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private DBDataSet dBDataSet;
private System.Windows.Forms.BindingSource dataBindingSource;
private PensionerMIS.DBDataSetTableAdapters.DataTableAdapter dataTableAdapter;
当我运行该程序时,我发现foll msg ........ dbdataset和dataTableAdapter从未分配给它们,并且将始终使用其默认值null,
我应该怎么做,另一个查询的相同代码运行良好,似乎代码没有变化,这是什么原因.
when i run the program, i found the foll msg ........ dbdataset and dataTableAdapter is never assigned to and will always use its default value null,
what should i do, same code for another query is running fine, seems no change in code that what is the reason
推荐答案
您永远不会设置dBDataSet dataTableAdapter.
像dataTableAdapter = new DataTableAdapter ( ... )
You are never setting the dBDataSet, dataTableAdapter.
Something likedataTableAdapter = new DataTableAdapter ( ... )
这样的东西,在设计器类中,它不会自动声明数据集和适配器,
没错,帕特尔先生
ok i got it, in designer class it is not automatically declaring the dataset and adapter,
u r right & thks Mr Patel
这篇关于c#DBSET和DataAdapter错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文