hello
can anyone help me to attach acces file to project becouse now when i change location of project, my project stop working becouse it has to be in same place where it was when i was adding a connection. I want to be able to change location of application and mdb file without any problems
thank a lot
arek

how to attach acces file to project in visualstudio 2003
Tony Deady
thanks a lot
arek
Leow Kah Man
MikkoL
If it's a Windows Forms app you can change the path to use referenced path names: instead of writing C:\..\...\file.mdb, you can do ./file.mdb
Kind regards,
Bjorn
Linda Li
Arek,
In .Net 2.0, we introduced the concept of Substituion string, which allows you to add Relative paths for AttachDbFileName. Look up http://blogs.msdn.com/dataaccess/archive/2005/10/28/486273.aspx for more details.
Hope this helps.
Maximus5150
While developing applications it is always a good thing decoupling your application with other sources (data sources - in this case your data source is access mdf file).
I guess your were using a new connection wizard and hardcoded your connection string into your project and so coupled your application with mdf file. To avoid such coupling simply specify your connection string in config file and assign value on initialization.