Results 1 to 7 of 7

Thread: Accessing DataSet from A While in B.

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216

    Cool Accessing DataSet from A While in B.

    How can I access a DataSet on Form1 from Form2?

    Thanks

  2. #2
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    I can think of many ways; CurrencyManager, pass in reference to dataset in the form's constructor, etc..

    Are you launching a modal dialog or just displaying another form?

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    another form

  4. #4
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    All you have to do is overload the form's constructor to accept a dataset as one of its parameters.

  5. #5

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    thanks I'll give it a go...

    What about inheriting the ds from the other form?

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    You could wrap up your dataset into a business object and expose to your other classes.

  7. #7

    Thread Starter
    PowerPoster
    Join Date
    Jan 2001
    Location
    Florida
    Posts
    3,216
    yes, cool, thanks

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