473,471 Members | 1,868 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Installation and File Path

Hello:

My program displays a Datagrid which is populated from an excel file. It is
done to show the end user a sample file. How can I reference the excel file
in the program connection string so that it can read it from the application
folder after install. I guess my question would be, how do i make it
independent of the path the user chooses to install the program.

Thank You
Prasun
Nov 21 '05 #1
2 888
Hi,

Hard code the path in the connection string

"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
"C:\MySheet.xls;Extended Properties=Excel 8.0; HDR = YES;"

Ken
=======================

"Prasun" <pr******@csufresno.edu> wrote in message
news:%2******************@TK2MSFTNGP15.phx.gbl...
Hello:

My program displays a Datagrid which is populated from an excel file. It is
done to show the end user a sample file. How can I reference the excel file
in the program connection string so that it can read it from the application
folder after install. I guess my question would be, how do i make it
independent of the path the user chooses to install the program.

Thank You
Prasun

Nov 21 '05 #2
Prasun,

Use the applicationstartup path in your connectionString and place the Excel
sheet there.

http://msdn.microsoft.com/library/de...ppathtopic.asp

In my opinion the most easy solution. However you get than the same (in my
opinion) ugly solution as done with all those Microsoft development tools,
where the usable data is in the Program Files.

Cor
Nov 21 '05 #3

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

Similar topics

1
by: Hai-Chu Hsu | last post by:
Hi, I want to restore my databases from the old SQL Server installation into a new installation of SQL Server. My new installation of SQL Server has different data path from the old...
20
by: John | last post by:
Hi When I create a setup for my application, it installs all files for the app in C:\Program Files\MyCo\MyApp folder. How can I have some of the files to be installed under :\Program...
4
by: coosa | last post by:
Hi, I was installing SQL Server on my machine and during installation my PC freezed. It happens frequently on my machine. So i tried after restarting to install it again and since then i always...
1
by: Jesse Albert | last post by:
I'm having a complete brainfart so I'll just let you all know the issue and listen to any possible solution you can offer without asking for a specific way to do this ;) I have a Solution ( VB...
1
by: -Lost | last post by:
I have been using a prepackaged WAMP (Windows Apache MySQL PHP) installation and along the way (over several years) have modified this and that, added vhosts, modified php.ini the way I want, set...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.