?
Solved

How to change the connectionstring during setup in VB.NET

Posted on 2004-03-24
2
Medium Priority
?
412 Views
Last Modified: 2006-11-17
I am using an oleDbConnection to connect to a MS Access file (mydata.mdb) that uses Connectionstring ....Datasource="c:\data\mydata.mdb"...
I want to give the users ability to change this filepath during setup.
A filedialog box (or something) to browse to a fileshare for example g:\data and then the setup will install/copy the mydata.mdb to g:\data,
and change the datasource path to the same selected fileshare.

I have tested the Application Configuration File withe the following xlm code:
<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
  <appSettings>
    <add key="datasource" value="g:\data" />
      </appSettings>
</configuration>

Example of different installation cenarios:
One company will maybe use a local installation and the datasource value would be "c:\data" (default)
The next company will maybe use a client/server model and the datasource value should point to a datashare ("x:\common")
The next company will maybe use a client/server model and the datasource value should point to a datashare ("f:\dep_data")
and so on...

I want the user/company to select where to put the mydata.mdb during setup ( OR at first application startup )
(Not manually change the configuration file).
0
Comment
Question by:Bengtb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 28

Accepted Solution

by:
mmarinov earned 1000 total points
ID: 10667641
0
 
LVL 28

Expert Comment

by:mmarinov
ID: 10676943
hi Bengtb,

what is wrong with the solution from the given link? Why grade C?

B..G
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question