473,466 Members | 1,367 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Selecting Database Path

Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db to
the app. How could I customize this so the path can be changed. I found
that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #1
3 1574
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's config
file ("MyInventoryApp.exe.config", for example). That can be changed by any
text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db to
the app. How could I customize this so the path can be changed. I found
that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #2
Yes, I was hoping to be able to program say a "Tools" form and allow the
user to select where the database resides then write that info to a config
file or store that path in the registry or something like that.

Tony K
"Chris" <ch*********@sbcgloal.netwrote in message
news:SM*******************@newssvr23.news.prodigy. net...
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's
config file ("MyInventoryApp.exe.config", for example). That can be
changed by any text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
>Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db
to the app. How could I customize this so the path can be changed. I
found that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #3
Chris,
How would I access the config file? The filename is
Inventory.exe.config and the info that I would need to access is:

<connectionStrings>
<add
name="Daily_Foods_Inventory.My.MySettings.Inventor y_management_databaseConnectionString"
connectionString="Provider=Microsoft.Jet.OLEDB.4.0 ;Data
Source=&quot;|DataDirectory|\Inventory management database.mdb&quot;"
providerName="System.Data.OleDb" />
</connectionStrings>

Tony K
"Chris" <ch*********@sbcgloal.netwrote in message
news:SM*******************@newssvr23.news.prodigy. net...
I'm assuming that you're using VB.NET for your application.

When you run the add data source wizard in VS2005, it will create an
application variable called "ConnectionString" in your applications's
config file ("MyInventoryApp.exe.config", for example). That can be
changed by any text editor.

Were you wanting the user to be able to change it via the user interface?

"Tony K" <no************@kingprogramming.comwrote in message
news:uu*************@TK2MSFTNGP06.phx.gbl...
>Hi all,
I have an inventory application I'm writing for the company I work for
and realized the path for the Access database might reside on a network
drive. I have used Microsoft's Add Data Source method of adding the db
to the app. How could I customize this so the path can be changed. I
found that the connection is a ReadOnly property and cannot be changed.

Thanks,

Tony K

Jul 24 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ones Self | last post by:
Hi, I have a tree structure which is maintained through the use of a path enumerated column: CREATE TABLE items ( item_id NUMERIC NOT NULL, path VARCHAR2(64) NOT NULL );
1
by: Ramesh | last post by:
hi, I am selecting fields from three table for manupulating data and i want to display total number of records selected. But i am always getting -1 value, eventhough 1000 of records are selected....
6
by: aaj | last post by:
Hi all I use a data adapter to read numerous tables in to a dataset. The dataset holds tables which in turn holds full details of the records i.e. keys, extra colums etc.. In some cases I...
3
by: larry mckay | last post by:
anyone have the code to select and listview item or row (subitems) after a doubleclick event from a listview. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate...
6
by: rdemyan via AccessMonster.com | last post by:
I don't understand why I can get the following to work: ------------------------------------------------------------------------------ -- SELECT A.*, B.* FROM TableA AS A, TableA AS B IN...
3
by: Mchine34 | last post by:
I have created an xslt that sorts the following xml on node: Path XSLT: <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">...
0
by: Tony K | last post by:
Hi all, I have an inventory application I'm writing for the company I work for and realized the path for the Access database might reside on a network drive. I have used Microsoft's Add Data...
1
by: sunny74 | last post by:
I am writing a ASP.NET 2.0 web based application in which I want the user to create & select a Folder using Windows Explorer.After the user creates and selects the folder, on pressing OK I should be...
5
by: hollyquinn | last post by:
Hi I am working with a web application where I am selecting values from a SQL Server 2005 database and then loading the values into different controls on my page. Most of the values load with no...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.