I have a program that uses mapped drives to connect to its database.
I am migrating it from windows xp, visual studio 2005 to windows 7 visual studio 2010.
It worked great before but now when i start up the software i get an error that it can't connect to the database, that its not a valid path.
However if i go into the software and use the attached code piece i can find the database in the same location, then close and restart the software and everything is fine.
Dim openFileDialog1 As New OpenFileDialog
openFileDialog1.Filter = "MS Access Database 2007 (*.accdb)|*.accdb"
openFileDialog1.RestoreDirectory = True
If openFileDialog1.ShowDialog() = DialogResult.OK Then
writeregistry("AdminScheduler", openFileDialog1.FileName, "PathtoDatabase")
dbpath = openFileDialog1.FileName