最近 在学习 c#入门经典,因为是新手 所以是按课本上一步步来的
在学习到 数据绑定->给应用程序添加数据源时,是按数据源 配置向导一步步到
给窗体添加数据绑定控件 :在 数据源中 拉了三个控件 直接绑定到窗体设计器可是按下F5  运行时 总是出现两处 错误 按理说 拉控件直接生成的代码不会出现啥问题的吧    (出错之处做了标记)
恳请大虾们帮忙修正 一下,感激不尽!以下  是代码:namespace gettingdata
{
    partial class gettingdata
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;
                /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }        #region Windows 窗体设计器生成的代码        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(gettingdata));
            System.Windows.Forms.Label pATIENT_IDLabel;
            System.Windows.Forms.Label pATIENT_NAMELabel;
            System.Windows.Forms.Label nAME_PHONETICLabel;
            this.dataSet3 = new gettingdata.DataSet3();//出错之处,提示为gettingdata.gettingdata 中不存在类型名称"DataSet3"
            this.wORKLISTBindingSource = new   System.Windows.Forms.BindingSource(this.components);
           this.wORKLISTTableAdapter = new 
gettingdata.DataSet3TableAdapters.WORKLISTTableAdapter();
//出错之处,提示为gettingdata.gettingdata 中不存在类型名称"DataSet3TableAdapters            this.wORKLISTBindingNavigator = new System.Windows.Forms.BindingNavigator(this.components);
            this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
            this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
            this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
.........
........

解决方案 »

  1.   

    把DataSet3改成DataSet试试吧
    我也是新手,不保证对啊
      

  2.   

    你没有dataset3和DataSet3TableAdapters的定义要不就在代码中new出来 或者在设计器中分别拖进来
      

  3.   

    DataSet3 是一个我在数据源配置向导里添加的一个 数据集名称, 无法在设计器中拖进来吧,拖进的只能是数据集中的数据表及数据行吧.   再者 DataSet3TableAdapters 好像是自动生成的窗体设计器的代码,一般是不让改的,我想既然不让改,应该不会有问题,可是 问题却发生了!疑惑...........
      

  4.   

    gettingdata.DataSet3()到底是什么啊?
    你在哪儿定义了?怎么会生成这种代码?
      

  5.   

    this.dataSet3 = new DataSet();
      

  6.   

    hoho 好像我一开始说的就是这个意思啊 lz
      

  7.   

    也感谢 jiatong1981(末日之痕) ,可惜 我那苯脑子 没在你的提示下反应 
    一并感谢 关注的朋友 们
      

  8.   

    hoho
    表这样说
    都是从不会到会的