Results 1 to 4 of 4

Thread: [RESOLVED] VB2005 - using a Dataset in different classes

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Location
    Germany, near Munich
    Posts
    172

    Resolved [RESOLVED] VB2005 - using a Dataset in different classes

    Hi all,

    as a beginner in VB 2005 (Express) I have another simple question. I want to build an application, which holds its data in a dataset. The reading and writing of data in the dataset should be controlled by several dialogs. Every dialog is placed on his own form what means, that it has its own class. Now I would like to know how and where in the application the dataset must be declared, so that I can connect to it from every class/dialog. What is best practice in this case?

    Thanks & have a good new year 2006!

    TheTree

  2. #2
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: VB2005 - using a Dataset in different classes

    You can create a module, and in that module, declare a new public dataset...
    VB Code:
    1. Module Module1
    2.     Public MyDataSet As New DataSet
    3. End Module
    MyDataSet should be accessible on all the forms after that...

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2005
    Location
    Germany, near Munich
    Posts
    172

    Re: VB2005 - using a Dataset in different classes

    Thanks gigemboy for that fast reply!!!

    I have spent hours to think about the problem and now the solution is so easy ... ;-)

    I wish you a happy new year!

    TheTree

  4. #4
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: [RESOLVED] VB2005 - using a Dataset in different classes

    No problem Welcome to the forum!
    Last edited by gigemboy; Jan 1st, 2006 at 06:17 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width