AttachDbFilename in DbNameDataSet.xsd
How can I useAttachDbFilename in DbNameDataSet.xsd to access the database in the same directory as the exe file (i.e. the application using it)?
Use Application.StartupPath to get the directory your program is in.
To get the complete filename to your mdf file, use:
| |
string filename = System.IO.Path.Combine(Application.StartupPath, "filename.mdf");
|