Control Panel
Forum
Hosting Help
ASP.NET 3.5 & SQL 2008 Web Hosting
Resources
Login
Members
Shared Hosting
|
New Features
|
Advertise
|
Tutorials
|
Silverlight Tutorials
|
Product Reviews in India
|
Free aptitude test questions
|
TATA Nano Car reviews
Total
members
:
88776
Average new registrations per day (in last 7 days):
89
New Registration:
Open
Register Now
Home
»
Questions & Answers
»
Database Connection String
Database Connection String
9/22/2008
Author:
Shishir
http://aspspider.info/bullu
Home Security
i want to connect my access database which is in the database folder to my windows application which path should i use.........
Answers .............
Author:
Jean-Francois Blouin
Posted Date: 9/24/2008
http://aspspider.net/JFBlouin
House for rent
System.Windows.Forms.Application.StartupPath returns a string which is the path to the EXE of the windows application.
Hence, you can do something like:
string databaseDirectory = System.IO.Path.Combine(System.Windows.Forms.Application.StartupPath, "Database");
And build your connection string using this path.
Jeff
Author:
Izharuddin S Shaikh
Qualis Advisers Private Limited
Posted Date: 10/30/2008
http://aspspider.info/izhar
DotNetExpress
Yes, I read the solution of Jeff, go for it.
You must
login
to post answer for this question.
Partners
Privacy Policy
Terms of use
Contact Us
SpiderWorks Technologies.
All Rights Reserved.