Solved

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

Posted on 2011-09-20
4
209 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
Comment Utility
Do you have UAC enabled?
0
 

Author Comment

by:Millkind
Comment Utility
Yes I will try disabling today.
0
 

Author Comment

by:Millkind
Comment Utility
Yep that worked thanks.
0
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
Glad to help :-)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

763 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

6 Experts available now in Live!

Get 1:1 Help Now