|
-
Apr 12th, 2005, 11:18 AM
#1
Thread Starter
Hyperactive Member
DAO and MS Access
am using DAO in my VB project with means my Access has to be in MS Access 97. its working fine but i want to passwordthe mdb file. i dont know how to open the file in VB, icant set the password property or whats wrong
dayo
Nobody is smarter than all of us!
-
Apr 12th, 2005, 11:30 AM
#2
Re: DAO and MS Access
VB Code:
Set objDB = OpenDatabase("C:\SomePath\SomeName.mdb", _
True, False, ";pwd=yourpassword")
"It's cold gin time again ..."
Check out my website here.
-
Apr 12th, 2005, 11:32 AM
#3
Re: DAO and MS Access
You need to set the password in Access first. Then you need to create a DAO workspace to connect and pass a password.
VB Code:
Private wsDB As Workspace
Private dbDB As Database
Set wsDB = DBEngine.CreateWorkspace("Username", "admin", "pwd")
Set dbDB = wsDB.OpenDatabase("DBName")
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 12th, 2005, 12:48 PM
#4
Lively Member
Re: DAO and MS Access
Weird, Im using Access 2003 with DAO. I dont think its limited to the old 97 version.
-
Apr 12th, 2005, 12:54 PM
#5
Re: DAO and MS Access
Correct, DAO still lives on.
"It's cold gin time again ..."
Check out my website here.
-
Apr 12th, 2005, 01:07 PM
#6
Thread Starter
Hyperactive Member
Re: DAO and MS Access
 Originally Posted by haruki
Weird, Im using Access 2003 with DAO. I dont think its limited to the old 97 version.
whenever i set the database name in the property window, when i get to the recordsource property,i receive an error, so i tried converting the mdb to 97, using tools menu in access and henceforth it worked fine. so i guessed it was the version. or what do u think?
Nobody is smarter than all of us!
-
Apr 12th, 2005, 01:15 PM
#7
Re: DAO and MS Access
I thought that in order to make changes to a 97 db you needed to convert it to 2000. Then it doesnt matter
which version of Access your running.
Are you using the Data control to try to connect?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Apr 12th, 2005, 01:25 PM
#8
Re: DAO and MS Access
 Originally Posted by RobDog888
I thought that in order to make changes to a 97 db you needed to convert it to 2000. Then it doesnt matter
which version of Access your running.
Are you using the Data control to try to connect?
If you have the lastest version of MDAC installed (2.7 I believe), you can use DAO with Access 2000 (I know...I accidentally converted my 97 Access copy of Biblio to Access 2000 against which I was running some DAO code on other problem on the forum, and got myself all bollaxed up because my version of MDAC wasn't up to date.)
-
Apr 12th, 2005, 01:49 PM
#9
Re: DAO and MS Access
Actually the latest MDAC is 2.8. Its included in Windows XP SP2, so if the thread starter is running that then
that could be an issue?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|