| |

VerySource

 Forgot password?
 Register
Search
View: 1530|Reply: 12

Master in the dataset Please use sharp eyes to help me check&to fix two errors!

[Copy link]

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

Post time: 2020-2-19 02:30:01
| Show all posts |Read mode
Recently, I am learning the classics of c # .Because I am a novice, I follow the steps in the textbook.
When you learn about data binding-> add a data source to your application,
Add data-bound controls to the form: Three controls were pulled in the data source directly bound to the form designer

But when I press F5 to run, there are always two errors. It stands to reason that the code directly generated by pulling the control will not cause any problems (the errors are marked)
I beg prawns to help correct it, thank you very much!

Here is the code:

namespace gettingdata
{
    partial class gettingdata
    {
        /// <summary>
        /// Required designer variables.
        /// </ summary>
        private System.ComponentModel.IContainer components = null;
                /// <summary>
        /// Clean up all resources in use.
        /// </ summary>
        /// <param name = "disposing"> true if the managed resource should be released; otherwise, false. </ param>
        protected override void Dispose (bool disposing)
        {
            if (disposing&&(components! = null))
            {
                components.Dispose ();
            }
            base.Dispose (disposing);
        }

        #region Windows Form Designer Generated Code

        /// <summary>
        /// designer supports required methods-don't
        /// Use a code editor to modify the contents of this method.
        /// </ 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 ();

// Where it went wrong, the prompt is that the type name "DataSet3" does not exist in gettingdata.gettingdata




            this.wORKLISTBindingSource = new System.Windows.Forms.BindingSource (this.components);
           this.wORKLISTTableAdapter = new
gettingdata.DataSet3TableAdapters.WORKLISTTableAdapter ();


// Where it went wrong, the prompt is that the type name "DataSet3TableAdapters does not exist in gettingdata.gettingdata



            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 ();
.........
........
Reply

Use magic Report

0

Threads

4

Posts

5.00

Credits

Newbie

Rank: 1

Credits
5.00

 China

Post time: 2020-4-28 21:45:01
| Show all posts
Try changing DataSet3 to DataSet
I am also a novice, not guaranteed right
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-5-1 11:45:01
| Show all posts
It seems not, but thank you for your attention!
Reply

Use magic Report

0

Threads

52

Posts

34.00

Credits

Newbie

Rank: 1

Credits
34.00

 China

Post time: 2020-5-1 23:30:01
| Show all posts
You don't have the definition of dataset3 and DataSet3TableAdapters

Either new out in the code or drag in separately in the designer
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-5-3 15:45:01
| Show all posts
DataSet3 is a data set name that I added in the data source configuration wizard. I ca n’t drag it in the designer, only the data tables and data rows in the data set. The DataSet3TableAdapters seem to be automatically generated The code of the body designer is generally not allowed to be changed. I think since there is no change, there should be no problems, but the problem has occurred! Doubts ...
Reply

Use magic Report

0

Threads

4

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-5-3 20:15:01
| Show all posts
What exactly is gettingdata.DataSet3 ()?
Where did you define it? How could this code be generated?
Reply

Use magic Report

0

Threads

9

Posts

8.00

Credits

Newbie

Rank: 1

Credits
8.00

 Israel

Post time: 2020-5-5 08:45:01
| Show all posts
This should not be all the code?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-5-18 03:15:01
| Show all posts
this.dataSet3 = new DataSet ();
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-3 22:30:01
| Show all posts
This is not all code, the error may have nothing to do with the following code
Reply

Use magic Report

1

Threads

6

Posts

7.00

Credits

Newbie

Rank: 1

Credits
7.00

 China

 Author| Post time: 2020-6-14 09:45:01
| Show all posts
Thanks toopopaas. , Finally got it at your prompt
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list