Add a Dataset in a class

Posted on 2009-04-30
Last Modified: 2012-05-06
Hi Experts
How can I create a dataset in the class? Are there tools that I can drag and drop like on a from or do I have to code it all by hand.
Question by:DjJohnny
    LVL 21

    Expert Comment

    Well you could just create a Dataset object and use that in your code by referencing it...that's if you want to use a wizard...otherwise you would create a dataset just as you would in aspnet..

    Author Comment

    Thank You ,

    I have never programed in I have some datasets in my project that I would like to use. Since I can not just drag and drop them on to my class like a form. How would I do it.
    Thank You
    LVL 83

    Accepted Solution

    If you have typed datasets in your project, you can instantiate them using a statement like this

    dim ds as new ProductsDataset

    Otherwise just
    dim ds as new DataSet
    LVL 21

    Assisted Solution

    I don't think its that simple Code Cruiser...I wish it was...DJ, I'm assuming you need code for accessing DB and putting that info from the database into the dataset, yes?

    I fnot CodeCruiser gave you the one line of code you needed.  Otherwise:  

    here's an example
    LVL 21

    Expert Comment

    If you need any help doing this, then place your code up and we can walk through it...

    and here's a video on .net programming how to video tutorials

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (…
    Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now