Solved

Using UDL file for Connecting Access Database

Posted on 2004-08-13
2
608 Views
Last Modified: 2008-01-09
Hi
I am using a UDL file to connect to MS Access database. Currently my database is not password protected. I need to know how can access password protected MDB and access the same using UDL. Please note that I do not want to specify the Password in UDL file, I want to hardcode the same within the application in Connection String.

Currently my string looks like

constr = "File Name = " & UdlFileName

I do not want to specify password in UDL as one can see that if they opened that in Notepad.

Please help as soon as possible.

Regds
Ashish P
0
Comment
Question by:ashishpayasi
2 Comments
 
LVL 17

Accepted Solution

by:
AerosSaga earned 125 total points
ID: 11792056
the connection string should be constructed like so:

#   Standard security:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;User Id=admin;Password=;"


#  Workgroup (system database):
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:System Database=system.mdw;"


#  With password:
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\somepath\mydb.mdb;Jet OLEDB:Database Password=MyDbPassword;"

Regards,

Aeros
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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