DataSet control

Hello everyone
I have problem with how to use DataSet control....
Also I do not see the DataSet control in my toolbox
Can anybody help me how to add DataSet in my toolbox

Thank you



Answer this question

DataSet control

  • mab296

    so Please can you tell me how to use DataSet ...
    how you declare dateSet
    can you give example.....
    Thank you

  • jwdaigle

    By default, the DataSet is in the toolbox's "Data" section.

  • wiu joe

    Hi,

    I just happen to watch a video on "Channel 9" where it showed this problem and how it works & why. It's done by Shamez Rajan.

    http://channel9.msdn.com/Showpost.aspx postid=138769

    It’s close to the end of the show, but the features he code's are very interesting also. He is using the VB Express copy and creates a web browser in no time.

    In a nut shell, the idea is that while you are coding your program, you would not want the data file to keep a mix of the old entry’s and the new ones. This would turn into a miss-mash of data.

    If you click the Database in Solution Explorer, then in the property’s window set the "Copy to Output Directory" to "Copy if newer".

    This will allow the data in the database to remain in place instead of getting re- written when you run again. It will only change if you have made changes to your program that effect the info in the database.

    It all does make sense, even if you don’t do the "Copy if Newer" change. Then add some data in a data grid, do a save, then go into My Doc's / projects / Your Program / debug / bin / then run the exe file, you will see you data.

    Hope this helps.
    And watch the video, it does show just some of the great new features in VB 2005.



  • Carl Berger

    Thanks for your help, steve.
    In Antoine's thread, he suggested two solutions as below.

    1. If you select local database file in the Solution Explorer window, you will see a property called ‘Copy to Output’ in the Properties window. By default it is set to ‘Copy Always’ which means that on each build, the data files in the project folder will be copied to the output folder overwriting the existing data files if any. You can set this property to Copy Never and then manually put a copy of the data file in the output folder. This way, on subsequent builds, the project system will leave the datafile in the output folder and not try to overwrite it with the one from the project. The downside is that you still have two copies so after you modify the database file using the app, if you want to work on those changes in the project, you need to copy it to the project manually and vise-versa.

    2. You can leave the data file outside the project and create a connection to it in Database Explorer. When the IDE asks you to bring the file into the project, just say no. This way, both the design-time and the run-time will be using the same data file but the downside is that the path in the connection string will be hard coded and therefore it’ll be harder to share the project and deploy the app. Before deploying the app, just make sure to replace the full path in the settings with a relative path.

    The first option is working. But, for the second option, I'm still working on.

    Thanks again.



  • Khead

    thanks alot Now I understand it.
  • nickelilltroll81

    Hello, Steve
    Did you try Lesson 9 on that page Working Its not working in my pc.
    Data in database can be transferred to dataset and user interface, but
    at the last stage on that video the changes in the user interface do not
    reflect back to the permanent database.
    My setup problem (i got all the latest express versions)
    If you know about this problem please help me out.
    Thanks in advance.


  • chrisclementdotcom2

    Try here, this has video's of all different aspects for getting started.

    Lesson's 8 & 9 talk about the dataset and how to set it up.


    DataSet info

  • el_richard

    It is a snapfu that Microsoft knows about, check this post.>
    http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=138462&SiteID=1

    There are other post that also discribe this problem. I will try and find them, and then post back to you.


  • DataSet control