Wrox Programmer Forums
|
Pro VB Databases Advanced-level VB coding questions specific to using VB with databases. Beginning-level questions or issues not specific to database use will be redirected to other forums.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 20th, 2005, 07:51 AM
Registered User
 
Join Date: Sep 2003
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Open access database with pwd

Greetings to all.

I have a problem opening an access database which has password. The code goes like this..

  Set con = New ADODB.Connection
  con.Provider = "Microsoft.Jet.OLEDB.4.0"
  con.Open "test.mdb, "pwd"

where "pwd" is my password.

I get the following error..
"Cannot start your application. The workgroup information file is missing or opened by another user."

I thought I made a mistake by not giving the user name and hence I tried using
con.Open "test.mdb, "admin", "pwd"

But I still get the same error.

Don't know where I am going wrong.

Need help.

- Sai

 
Old October 9th, 2005, 10:45 PM
Registered User
 
Join Date: Oct 2005
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

it should be con.open "test.mdb", "admin", "pwd"
the double quotes are missing after you database name, that could be the problem, otherwise there shouldnt be any problem with that






Similar Threads
Thread Thread Starter Forum Replies Last Post
How to open different access database from code TomW Access VBA 2 May 6th, 2008 11:49 AM
Backup an open access database (ado) jolzy VB Databases Basics 0 October 27th, 2004 09:38 AM
Microsoft Access can't open the database because. vinodkalpaka Classic ASP Components 2 August 4th, 2004 06:27 PM
Microsoft Access can't open the database because. vinodkalpaka Classic ASP Databases 2 July 24th, 2004 04:37 PM
Access Database: Open or closed?? Sach Classic ASP Databases 1 October 17th, 2003 06:21 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.