Hi All
I have come to the end of my first large project and would really appreciate some guidance on how to go about getting it into a finished state.
There are a few issues im worried about and having come this far and with a deadline looming im so worried im going to mess it up.
My Windows Application consists of a couple forms and a Access database and I used Visual C# 2005 to create it. In the application i have used Connectionstrings to connect to the database on each form aswell as using the wizard a few times to fill things like DataGridViews and Comboxes. Heres where it starts getting tricky, when I started filling these comboboxes with the wizard, the wizard would not allow me to choose the Access database i had already created possibly because of its postion in my project file, and automatically made a second copy of Database in another part of the project file. Since this occured, when i open a new form, the DataGridView and Comboboxes are no longer be updated with new information as they were before this duplicate file was created. Im not sure which file it should be in and how to change the wizards connection string.
I need to create a setup for the program in the easiest way but im worried about a few things
1. The Connectionstring on my forms not being the same as the directory the program will be installed on.
2. The Comboboxes etc not being updated because of the multiple database files
3. The Connection to the database from the wizard not being the same as the directory the program will be installed on.

Taking this mouthfull into account can anyone help me fix these issues and tell me how i can create a exe.
Any Help Would be Much Appreciated
Thanks

Recommended Answers

All 2 Replies

First, you should decide if you are going to use the Wizard created class or stick with your own connection objects. Personnally I hate the wizard created class, it is more trouble than it is worth.

Storing the location of the Access data file and the connection string can be either setup in your Settings.Settings, or create an XML file to hold that information. Then when the application first starts, check to see if these items have been assigned, and if not, give the user a form that will allow them to setup that information. You probably need that setup form anyway in case they decide to move the file, or change the connectionstring.

// Jerry

Hi All
I have come to the end of my first large project and would really appreciate some guidance on how to go about getting it into a finished state.
There are a few issues im worried about and having come this far and with a deadline looming im so worried im going to mess it up.
My Windows Application consists of a couple forms and a Access database and I used Visual C# 2005 to create it. In the application i have used Connectionstrings to connect to the database on each form aswell as using the wizard a few times to fill things like DataGridViews and Comboxes. Heres where it starts getting tricky, when I started filling these comboboxes with the wizard, the wizard would not allow me to choose the Access database i had already created possibly because of its postion in my project file, and automatically made a second copy of Database in another part of the project file. Since this occured, when i open a new form, the DataGridView and Comboboxes are no longer be updated with new information as they were before this duplicate file was created. Im not sure which file it should be in and how to change the wizards connection string.
I need to create a setup for the program in the easiest way but im worried about a few things
1. The Connectionstring on my forms not being the same as the directory the program will be installed on.
2. The Comboboxes etc not being updated because of the multiple database files
3. The Connection to the database from the wizard not being the same as the directory the program will be installed on.

Taking this mouthfull into account can anyone help me fix these issues and tell me how i can create a exe.
Any Help Would be Much Appreciated
Thanks

.NET applications are deployed at Debug\Bin folder. You have to set Copy to Output Directory property of your access database in the project with Copy if Newer or Dont Copy value.

Read MSDN documentation of ADO.NET class library for further details.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.