|
-
Jan 1st, 2006, 05:20 AM
#1
Thread Starter
Addicted Member
[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
-
Jan 1st, 2006, 05:29 AM
#2
Re: VB2005 - using a Dataset in different classes
You can create a module, and in that module, declare a new public dataset...
VB Code:
Module Module1
Public MyDataSet As New DataSet
End Module
MyDataSet should be accessible on all the forms after that...
-
Jan 1st, 2006, 05:36 AM
#3
Thread Starter
Addicted Member
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
-
Jan 1st, 2006, 06:13 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|