473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Connecting to ADO database

I'm using the following code to connect to an access 2000
database.
(with reference to adodb)
Public DBvar As New ADODB.Connection()
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb", "userID", "Pass")
Previously I was connecting with just
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb")
and it was working fine because I had not set a password
for the database. Then I set a password and now using:
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb", "Admin", "Pass")
and I get this error:
"Cannot start your application. The workgroup information
file is missing or opened exclusively by another user."
When I set the password I had to open the database file
exclusively for it to set it. Does that have anything to
do with it?
What does this error mean? How do I fix this?

Thank you

Seb

Nov 20 '05 #1
5 2107
Hi Sebastian,

I think that the best thing to do for specific Classic problems is to ask it
in a VB classic newsgroup.

microsoft.public.vb

I think you have more change to find information there because in VB.net is
mostly used Ado.net.

Cor
Nov 20 '05 #2
For one thing it looks as though your connection string is structured
incorrectly. Make a text file on the desktop, rename it to something.udl
and create your connection string in the GUI. Then open the udl in notepad
and cut and pasted your connection string.

Is this VB6? If it is .NET you should be using oledb namespace for
connecting to Access mdb. Regardless of whether it is VB6 or .NET, take a
look at your connection string.
"Sebastian" <Se*******@ilogic.com> wrote in message
news:d6****************************@phx.gbl...
I'm using the following code to connect to an access 2000
database.
(with reference to adodb)
Public DBvar As New ADODB.Connection()
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb", "userID", "Pass")
Previously I was connecting with just
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb")
and it was working fine because I had not set a password
for the database. Then I set a password and now using:
DBvar.Open("Provider=Microsoft.Jet.OLEDB.4.0; Data
Source=Data.mdb", "Admin", "Pass")
and I get this error:
"Cannot start your application. The workgroup information
file is missing or opened exclusively by another user."
When I set the password I had to open the database file
exclusively for it to set it. Does that have anything to
do with it?
What does this error mean? How do I fix this?

Thank you

Seb

Nov 20 '05 #3
How do I need to change the code to connect using ado .net
with username and password?
Do I remove the reference to adodb? Do I add any other
references?

Thanks

Sebastian
-----Original Message-----
Hi Sebastian,

I think that the best thing to do for specific Classic problems is to ask itin a VB classic newsgroup.

microsoft.public.vb

I think you have more change to find information there because in VB.net ismostly used Ado.net.

Cor
.

Nov 20 '05 #4
Hi Sebastian,

When you use AdoNet you cannot use the recordset, however filling a dataset
can be as simple as this

dim conn as new OleDb.OleDbconnection(www.connectionstrings.com)
dim ds as new dataset
dim da as new OleDB.OleDbDataAdapter("Select * From Mytable",conn)
da.fill(ds)

And your dataset is filled.

I hope this give you an idea?

Cor
Nov 20 '05 #5
www.connectionstrings.com rocks - thanks, Cor!

"Cor Ligthert" <no**********@planet.nl> wrote in message
news:%2*****************@TK2MSFTNGP11.phx.gbl...
Hi Sebastian,

When you use AdoNet you cannot use the recordset, however filling a dataset can be as simple as this

dim conn as new OleDb.OleDbconnection(www.connectionstrings.com)
dim ds as new dataset
dim da as new OleDB.OleDbDataAdapter("Select * From Mytable",conn)
da.fill(ds)

And your dataset is filled.

I hope this give you an idea?

Cor

Nov 20 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Morgan | last post by:
I have Enterprise Manager on my local machine. For the last twelve months it has been connecting without problem to my online SQL Server database provided by my ISP. Three weeks ago the ISP...
4
by: CodeImp | last post by:
A simple app I quickly wrote to try getting info from a database. Here is the first part of its code. The rest of the code is irellevant. using System; using System.Data; using...
12
by: Ann Marinas | last post by:
Hi all, I would like to ask for some help regarding separating the asp.net webserver and the sql server. I have created an asp.net application for a certain company. Initially, we installed...
3
by: GTDriver | last post by:
I'm trying to connect my application with a web service located on my own web server(localhost). I guess when the solution/proect is built it makes a file called 'Web...
5
by: nielsgron | last post by:
Hi, I have created a database on DB2 8.1 and 8.2 for Windows using the codeset "Big5" with the command: db2 CREATE DATABASE TWBIG5 USING CODESET BIG5 TERRITORY TW When I try to connect to...
5
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop and created the sample database. Now I'm having truble connecting to the database from Command Editor. If I connect from Command Window it's...
0
by: =?Utf-8?B?R2lkaQ==?= | last post by:
Hi, I've my win32 application which connecting to my sql database. till now i used MSDE as my database and now i want to upgrade to sql express 2005. after the upgrade i tried to connect to the...
3
by: Sebouh | last post by:
Hi guys. I'm completely new to databases, so i wanna ask you if this is achievable. I've been learning how to connect to an MS SQL database file with java. I've finally learned the basics,...
2
by: bobt1991 | last post by:
I just installed Microsoft Visual Studio 2008 Express edition, and it installs some sort of stripped down version of SQL Server. It comes with no tools for connecting to your "local" database,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.