|
-
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 
-
Apr 12th, 2005, 03:25 PM
#10
Member
Re: DAO and MS Access
implementing just a single password potentially is a bad idea. if in the future u r trying to expand the app for multi users u will not be able to create users, so u cant set access permision. look up workgroup info files for further info on this.
ps
i am coding a security sys for my app at the minute which uses workgroup file and its prooving to be very hard as i cant find any good tutorials on it and the documentation isnt very good
-
Apr 23rd, 2005, 01:53 PM
#11
Thread Starter
Hyperactive Member
Re: DAO and MS Access
plz, when i try to open the app on an OS with no VB installed , i received errors,
something like this
runtime error "713"
class not registered,looking for object with CLSID: {00000010-0000-0010-8000-00AA00602EA4}
how am i goona fix this thru my VB code (including other means)?
waiting
Nobody is smarter than all of us!
-
Apr 23rd, 2005, 05:34 PM
#12
Re: DAO and MS Access
You can't fix it in code, you need to create an installation package for your program.
You can use the Package & Deployment Wizard that comes with VB (it should be on your start menu), or one of the many alternatives (see our Application Deployment forum for details & advice).
Last edited by si_the_geek; Apr 23rd, 2005 at 05:40 PM.
-
Apr 27th, 2005, 12:37 PM
#13
Thread Starter
Hyperactive Member
Re: DAO and MS Access
 Originally Posted by si_the_geek
You can't fix it in code, you need to create an installation package for your program.
You can use the Package & Deployment Wizard that comes with VB (it should be on your start menu), or one of the many alternatives (see our Application Deployment forum for details & advice).
something like using regserver from VB from the application is launched and un-register it when the application closes because the application will not be distributed as an installation but as a stand -alone EXE on a CDROM disk
Nobody is smarter than all of us!
-
Apr 27th, 2005, 12:45 PM
#14
Re: DAO and MS Access
 Originally Posted by oyad
something like using regserver from VB from the application is launched and un-register it when the application closes because the application will not be distributed as an installation but as a stand -alone EXE on a CDROM disk
This isn't going to work as you are finding out. You must create an installation package that will include all of the dependancy files required by your .Exe or the program will never, ever, run.
The installation package, not the .Exe should be on the CD, and the customer should be provided with instructions on how to run the install.
-
Apr 28th, 2005, 01:50 PM
#15
Thread Starter
Hyperactive Member
Re: DAO and MS Access
 Originally Posted by Hack
This isn't going to work as you are finding out. You must create an installation package that will include all of the dependancy files required by your .Exe or the program will never, ever, run.
The installation package, not the .Exe should be on the CD, and the customer should be provided with instructions on how to run the install.
hi, plz can u help, i just discovered that the rest app had similar problems-like error-one of its dependences not file or missing file , for tabctl32.ocx,winsock.ocx,flxgrd.ocx etc. any tip or solution.
plz, am waiting!
oyad
Nobody is smarter than all of us!
-
Apr 28th, 2005, 01:54 PM
#16
Re: DAO and MS Access
Like Hack suggested, you need to create an installation package. You can use the P&D Wizard that
comes with VB to create one or download one from the Application Deployment FAQ forum.
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
|