473,732 Members | 1,936 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Connectio n()
DBvar.Open("Pro vider=Microsoft .Jet.OLEDB.4.0; Data
Source=Data.mdb ", "userID", "Pass")
Previously I was connecting with just
DBvar.Open("Pro vider=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("Pro vider=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 2129
Hi Sebastian,

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

microsoft.publi c.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*******@ilog ic.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.Connectio n()
DBvar.Open("Pro vider=Microsoft .Jet.OLEDB.4.0; Data
Source=Data.mdb ", "userID", "Pass")
Previously I was connecting with just
DBvar.Open("Pro vider=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("Pro vider=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.publ ic.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.OleDbconn ection(www.connectionstrings.com)
dim ds as new dataset
dim da as new OleDB.OleDbData Adapter("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**********@p lanet.nl> wrote in message
news:%2******** *********@TK2MS FTNGP11.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.OleDbconn ection(www.connectionstrings.com)
dim ds as new dataset
dim da as new OleDB.OleDbData Adapter("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
5493
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 applied some sort of extra security arrangements to their SQL Server to allow access only through port 1433. they have told me to configure an alias using Network Client and to register this alias in the usual way using my Enterprise Manager. My...
4
1799
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 System.Data.SqlClient; using System.Threading; namespace TestSQL { class Class1
12
2787
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 both the iis and sql server in a single machine. Not too long ago, the machine had some hardware problems, and management has decided to purchase new servers, for both asp.net and sql server.
3
3741
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 References\localhost\References.vb' In this file a line of code reports the following error: Line of code: Dim results() As Object = Me.Invoke("GetCustomers", New Object() {Country})
5
7594
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 the database using the DB2 Universal Type 4 JDBC drivers v2.6 I get an error: "com.ibm.db2.jcc.b.DisconnectException: encoding not supported!!
5
2482
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 no problem connecting to sample (or any other databases - local or remote), but if I try to connect from Command Editor I'm not able to do that. There is no error message, the Progress dialog just run and run without anything happening. Is this...
0
1546
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 database and couldn't. i keep getting an error which saying that database doesn't exists or access is denied. is there something diffrent between connecting to MSDE and connecting to sql express 2005 ? here with my connection string.
3
1446
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, connecting and manipulating... but here's what i wanna do. I don't want to connect to a server to change the database content. I want to have the database file inside the application folder and manipulate it directly from there, without logging on to some...
2
5061
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, creating tables, etc., but it does allow you to create database files in SDF format within the IDE. My question is: How do you then connect to these database files in Perl? I tried creating an ODBC connection, but there seems to be no way to tie an...
0
8944
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8773
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9306
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9234
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9180
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6030
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4548
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3259
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.