deploying multiple form application that uses Access database

04-19-06, 11:49 AM
|
|
New Member
|
|
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
deploying multiple form application that uses Access database
Hi, I have a program that is written in VB.net and uses an Access database as a backend. So far I have a main form that does quite a bit of interaction with database (add, search, delete, databinding), but I would appreciate some advice on making my program deploying my program. I also did the set up wizard and have the .exe able to be installed and work. My questions are:
How do I access the database from multiple forms? I do most of the interaction from the main form, but would like to open up a second form to add and delete rows from certain tables in the database. Can I work with the main form's dataset from the other form?
How do I create new "projects"? My program is a note-taking aid for research papers. I would like the user to be able to create new, save and close sets of notes for each research paper. Should I use one database and have a seperate table called "project" that keeps track of which notes belong to which projects, or should I create a new instance of the program all-together?
I've been doing quite a bit of work on this, so I am pretty familiar with the environment, but am obviously pretty clueless on the next steps. I would appreciate any solutions or advice on good resources on these topics. Thanks a ton!
Laura
|

04-19-06, 03:54 PM
|
 |
Community VIP
|
|
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
|
|
Quote:
|
How do I access the database from multiple forms? I do most of the interaction from the main form, but would like to open up a second form to add and delete rows from certain tables in the database. Can I work with the main form's dataset from the other form?
|
You can do that if you declare the dataset a global dataset. To do that, just create a seperate Module and declare the dataset public inside that module.
Quote:
|
How do I create new "projects"? My program is a note-taking aid for research papers. I would like the user to be able to create new, save and close sets of notes for each research paper. Should I use one database and have a seperate table called "project" that keeps track of which notes belong to which projects, or should I create a new instance of the program all-together?
|
Its a matter of preference. Whatever works for you best.
Quote:
|
I've been doing quite a bit of work on this, so I am pretty familiar with the environment, but am obviously pretty clueless on the next steps. I would appreciate any solutions or advice on good resources on these topics. Thanks a ton!
|
I also recommend that you create/use standalone DLL Libraries to use with projects, since they do tend to make life a lot easier. Do a search on "how to create a dll in VB.NET" and see what you come up with.
|

04-19-06, 06:57 PM
|
|
New Member
|
|
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
thanks a lot
thanks for helping me! It means a lot. I have a few follow-up questions if you or someone else doesn't mind.
First, the main form of my program has a lot of controls (text boxes, lists) that are bound to the dataset which is filled with dataAdapters. Is there an easy way to migrate the bindings and data adapters to the new, global datset, or will I have to start over and manually try to bind the data, set up, and build the new datset? I have already tried to simply make the datset on my main form public. I've also unsuccessfully tried to declare a global dataset, create a datset for each form, and use the dataset.copy function to try to maintain a global datset between the forms.
Also, when I try to create a new instance of my program, where do I put the database? If I put it in the bin folder will a new, structured but blank database be created when I use the dll's to make a new instance?
Thanks!
Laura
|

04-20-06, 02:24 AM
|
 |
Community VIP
|
|
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
|
|
Quote:
|
Originally Posted by lschafer
Is there an easy way to migrate the bindings and data adapters to the new, global datset, or will I have to start over and manually try to bind the data, set up, and build the new datset?
|
You can do the identical thing that the wizards sets up for you manually. That way you can call it whenever it is needed from where ever it is needed.
Quote:
|
I have already tried to simply make the datset on my main form public. I've also unsuccessfully tried to declare a global dataset, create a datset for each form, and use the dataset.copy function to try to maintain a global datset between the forms.
|
I could post an example for you in a day or two if you are interested.
Quote:
|
Also, when I try to create a new instance of my program, where do I put the database? If I put it in the bin folder will a new, structured but blank database be created when I use the dll's to make a new instance?
|
It depends on your database structure. If you are going to write all the data into the same database but different tables, you can use the same mdb file in the bin folder. If not, you can copy the mdb file for each user.
Last edited by digioz; 04-20-06 at 02:49 PM.
|

04-20-06, 11:57 AM
|
|
New Member
|
|
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
i'd appreciate it
I'd appreciate the sample...hopefully it will be in time for my project (due tomorrow); but, if not, I'm sure there's a lot of people out there looking for the same thing because lord knows I've looked everywhere trying to learn how to do this right. It just seems like something that is common enough that there would be some step-by-step tutorials out there.
|

04-20-06, 04:00 PM
|
 |
Community VIP
|
|
Join Date: Oct 2003
Location: Chicago, IL
Posts: 2,171
Thanks: 3
Thanked 9 Times in 9 Posts
|
|
Quote:
|
Originally Posted by lschafer
I'd appreciate the sample...hopefully it will be in time for my project (due tomorrow); but, if not, I'm sure there's a lot of people out there looking for the same thing because lord knows I've looked everywhere trying to learn how to do this right. It just seems like something that is common enough that there would be some step-by-step tutorials out there.
|
Laura,
Maybe it would be easier if you post your project in a zip file, along with the Access Database file you are using, etc. That way I can just add a few things to it and you can see the result right away (since you want it by tomorrow).
Pete
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|