Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to SQL 3 Seminar Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Pass Passwd to OpenDatabase
Sami Shamma 
             
3 years ago
Happy Thanksgiving

I am altering a table on 16 remote backend databases. Those data bases have a password. Can I pass the password with my Open.Database statement?

The code works on my password protected backend but gives 3031 Runtime error: Not a valid password on the unopen other databases. all the databases share the same password.

Many thanks
Kevin Yip  @Reply  
     
3 years ago
Hi Sami, does "remote" mean your local network or a hosting service on the Internet?

In a local environment, this is how I use OpenDatabase on a password-protected Access file:

    Dim ws As Workspace, db As Database, r As Recordset
    Set ws = CreateWorkspace("", "admin", "")
    Set db = ws.OpenDatabase("X:\My Documents\MyDB.accdb", False, False, ";pwd=plumbingplumbing")
    Set r = db.OpenRecordset("MyTable1")
    r.MoveFirst
    Etc.

As long as you have full access to the path in drive "X:" above, it should work.

I don't have access to any of Richard's courses so I can't give you help that pertains to his lessons.  He may have some other ways to do it.  Another way to open a database is via ADO.  The method I used above is DAO.

If your file is on the Internet via hosting service, cloud drive, and the likes, it may be impossible because OpenDatabase requires a local path, or something that looks like it: X:\xxxx\xxxx

This thread is now CLOSED. If you wish to comment, start a NEW discussion in SQL 3 Seminar Lessons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 8/16/2026 6:30:17 AM. PLT: 1s