|
-
Mar 2nd, 2006, 04:38 PM
#1
Thread Starter
Hyperactive Member
Access db connection error.
I am using VB 6.0 with an Access database. The program worked fine until I password protected the database. Now I am getting the following error:
"Cannot start your application. The workgroup information file is missing or opened exclusively by another user."
The path is correct and I did open the database exclusively to set the password, but then closed it. The following is the connection string I am using. I can get it to work with an ODBC connection, but I don't want to use that.
VB Code:
Set Conn = New Connection
Conn.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data source=" + App.Path + "\database.mdb;password=pword"
'The following one works
'Conn.ConnectionString = "PROVIDER=MSDASQL;Data Source=Support;password=pword"
Conn.open
Please help!
Last edited by Chrissy; Mar 2nd, 2006 at 05:23 PM.
Reason: add something
-
Mar 2nd, 2006, 05:23 PM
#2
Re: Access db connection error.
If you set a database password then try this connectionstring.
VB Code:
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\database.mdb;Jet OLEDB:Database Password=MyDbPassword;"
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 
-
Mar 2nd, 2006, 05:25 PM
#3
Thread Starter
Hyperactive Member
Re: Access db connection error.
That worked! Thank you so much! Why is the connection string different than the standard? It seems like there are so many different combinations....
-
Mar 2nd, 2006, 05:44 PM
#4
Re: Access db connection error.
Its because your using a database password vs a user password. You can find all your connectionstring needs over at http://www.connectionstrings.com
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
|