• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 231
  • Last Modified:

Mapped Drive connection problem in windows 7 software created with vb.net 2010

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

Open in new window

0
Millkind
Asked:
Millkind
  • 2
  • 2
1 Solution
 
CodeCruiserCommented:
Do you have UAC enabled?
0
 
MillkindAuthor Commented:
Yes I will try disabling today.
0
 
MillkindAuthor Commented:
Yep that worked thanks.
0
 
CodeCruiserCommented:
Glad to help :-)
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now