Solved

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

Posted on 2011-09-20
4
212 Views
Last Modified: 2012-08-13
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
Comment
Question by:Millkind
  • 2
  • 2
4 Comments
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 36570342
Do you have UAC enabled?
0
 

Author Comment

by:Millkind
ID: 36572899
Yes I will try disabling today.
0
 

Author Comment

by:Millkind
ID: 36572956
Yep that worked thanks.
0
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 36575934
Glad to help :-)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Name space syntax error 12 41
Windows 7s template 4 39
Receiving a string from a WebService Push 21 37
Pervasive SQL Error 4 23
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now