Solved

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

Posted on 2011-09-20
4
216 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Error applying Windows 7 Service Pack 1 14 78
Filtering a datagrid view 8 34
Domain User is unable to see any drives in her "My Computer" 9 50
Delete Temp on all PCs 7 52
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
OfficeMate Freezes on login or does not load after login credentials are input.
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 teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…

726 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