In VB 6 I could set all my database connections pretty easy at runtime so they would be in app.path "path".
VS2005 is a little weirder......
SPAth = System.Windows.Forms.Application.StartupPath and it returns the debug folder.....no problem right When I install this will it be smart enough
Database connections.....when made with the designer....are they ALSO smart enough to transform themseves with the installer so that the program dumps them into the App.Path directory or do I need to set them at run time
Thanks

Question on database paths (Was: Stupid Question)
BradSmith
When I install this will it be smart enough
Where-ever you install it, that's the path it will return.
Database connections.....when made with the designer....are
I have no idea, sorry. I would always put the database connection string in the app.config file, so the user can easily modify it if need be.
rtsboy
You can certainly assign a database connection at runtime, but the only way to do that is via a connection string, no matter where it comes from. The app.config is just the obvious place to look for it.
You can generate it yourself in code if you want to, using the current path and the known name of the mdb ( I assume that's what you're using ). If it were me, I'd still try to read it from the app.config, but generate a value if there's not one in the config file. You never know when you'll wish you could change it.
Yoel Grodentzik
No, what I'm saying is, it's good to have the option to change it later. You can, however, generate a default string in code, which is the best way to get to your application install directory. No, the installer is not going to change your config file.
*grin* I'm sure you don't want that, that's what the test cycle is for...
Like I said, I never use wizards to create database connections, so I can't comment in depth. If you need to use wizard generated connections, your best bet to test them is to install on some non dev machines in different directories and see what happens.
Manfred Bjorlin
Thanks for the help.........I figured this was going to suck!
Great development platform.................USELESS documentation!!!!
madscene
OK...so I will succome to the brow beating of using the app.config file. BUT....how can I do it now Lets just say I know my app is going to install in C:/Program Files/My Products Directory Do I out that it in the app.config file OR- when I build this app with the installer will it be smart enough to just know to include my data-base file in the applications path and I really dont need to worry about this
The last thing I want to do is send out a product and then have 29423429384 emails that my customers cant connect to the database because it is looking for a resource on my computer and not theirs.....
I created the connection with the wizard and all works fine on this machine I just need to make SURE it will work as planned in the real world...
shassbel
Is it possible to just assign the DataSet, BindingSource and TableAdapter at runtime like we could veru easily in VB6. I am very leary of using a configured connection string like the app config shows. This is commercial software that will have NO need for the user to ever change. It also makes web updates easier....
I would like to be able to assign the above in the form load event.....App.Path + " /Path)