Home All Groups Group Topic Archive Search About

Connection string does not work

Author
20 Dec 2006 10:59 PM
Robert Dufour
This is the error I get
Message "No error information available: DB_E_ERRORSOCCURRED(0x80040E21)."
String

This is the basic code with whicj I am testing it.

Dim MyConn As New System.Data.OleDb.OleDbConnection

MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
catalog=RmtTel; Integrated security=True"

MyConn.Open() This statement gives me the above error, however from reading
the docs it should be OK.



Can anyone tell me what's happening and how to fix this problem?

Any help appreciated,

Bob

Author
21 Dec 2006 12:33 AM
Kerry Moorman
Bob,

You might try:

Provider=sqloledb

instead of:

Provider=sqloledb.1

Kerry Moorman


Show quoteHide quote
"Robert Dufour" wrote:

> This is the error I get
>  Message "No error information available: DB_E_ERRORSOCCURRED(0x80040E21)."
> String
>
> This is the basic code with whicj I am testing it.
>
> Dim MyConn As New System.Data.OleDb.OleDbConnection
>
> MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
> catalog=RmtTel; Integrated security=True"
>
> MyConn.Open() This statement gives me the above error, however from reading
> the docs it should be OK.
>
>
>
> Can anyone tell me what's happening and how to fix this problem?
>
> Any help appreciated,
>
> Bob
>
>
>
>
>
>
>
Author
21 Dec 2006 9:56 AM
Robert Dufour
Using sql server 2000 and sql server 2005 (must run on both). I had tried
that before, same result.
BOB
Show quoteHide quote
"Kerry Moorman" <KerryMoor***@discussions.microsoft.com> wrote in message
news:1320E359-D607-4628-BC35-A405D21455CD@microsoft.com...
> Bob,
>
> You might try:
>
> Provider=sqloledb
>
> instead of:
>
> Provider=sqloledb.1
>
> Kerry Moorman
>
>
> "Robert Dufour" wrote:
>
>> This is the error I get
>>  Message "No error information available:
>> DB_E_ERRORSOCCURRED(0x80040E21)."
>> String
>>
>> This is the basic code with whicj I am testing it.
>>
>> Dim MyConn As New System.Data.OleDb.OleDbConnection
>>
>> MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
>> catalog=RmtTel; Integrated security=True"
>>
>> MyConn.Open() This statement gives me the above error, however from
>> reading
>> the docs it should be OK.
>>
>>
>>
>> Can anyone tell me what's happening and how to fix this problem?
>>
>> Any help appreciated,
>>
>> Bob
>>
>>
>>
>>
>>
>>
>>
Author
21 Dec 2006 6:19 AM
Cor Ligthert [MVP]
Robert,

I think that it would be much easier to help you if you told us what kind of
databaseserver you are using.

Cor

Show quoteHide quote
"Robert Dufour" <bduf***@sgiims.com> schreef in bericht
news:OCvdDrIJHHA.1504@TK2MSFTNGP03.phx.gbl...
> This is the error I get
> Message "No error information available: DB_E_ERRORSOCCURRED(0x80040E21)."
> String
>
> This is the basic code with whicj I am testing it.
>
> Dim MyConn As New System.Data.OleDb.OleDbConnection
>
> MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
> catalog=RmtTel; Integrated security=True"
>
> MyConn.Open() This statement gives me the above error, however from
> reading the docs it should be OK.
>
>
>
> Can anyone tell me what's happening and how to fix this problem?
>
> Any help appreciated,
>
> Bob
>
>
>
>
>
>
Author
21 Dec 2006 9:56 AM
Robert Dufour
Using sql server 2000 and sql server 2005 (must run on both)bOB
Show quoteHide quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uILh3eMJHHA.1008@TK2MSFTNGP06.phx.gbl...
> Robert,
>
> I think that it would be much easier to help you if you told us what kind
> of
> databaseserver you are using.
>
> Cor
>
> "Robert Dufour" <bduf***@sgiims.com> schreef in bericht
> news:OCvdDrIJHHA.1504@TK2MSFTNGP03.phx.gbl...
>> This is the error I get
>> Message "No error information available:
>> DB_E_ERRORSOCCURRED(0x80040E21)." String
>>
>> This is the basic code with whicj I am testing it.
>>
>> Dim MyConn As New System.Data.OleDb.OleDbConnection
>>
>> MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
>> catalog=RmtTel; Integrated security=True"
>>
>> MyConn.Open() This statement gives me the above error, however from
>> reading the docs it should be OK.
>>
>>
>>
>> Can anyone tell me what's happening and how to fix this problem?
>>
>> Any help appreciated,
>>
>> Bob
>>
>>
>>
>>
>>
>>
>
>
Author
21 Dec 2006 10:51 AM
Norman Chong
Hi Robert,

Like Kerry wrote: Replace Provider=sqloledb.1 with Provider=sqloledb

Have you already visited www.connectionstrings.com?
Author
21 Dec 2006 4:20 PM
vbnetdev
Do not use OleDb. Use SqlClient for SQL databases.

off top of my head...

dim conn as New System.Data.SqlClient.SqlConnection
conn.ConnectionString = "Data Source=MAX;Initial Catalog=RmTel;Integrated
Security=True"
conn.Open()

Show quoteHide quote
"Robert Dufour" <bduf***@sgiims.com> wrote in message
news:OCvdDrIJHHA.1504@TK2MSFTNGP03.phx.gbl...
> This is the error I get
> Message "No error information available: DB_E_ERRORSOCCURRED(0x80040E21)."
> String
>
> This is the basic code with whicj I am testing it.
>
> Dim MyConn As New System.Data.OleDb.OleDbConnection
>
> MyConn.ConnectionString = "Provider=sqloledb.1;data source=MAX;initial
> catalog=RmtTel; Integrated security=True"
>
> MyConn.Open() This statement gives me the above error, however from
> reading the docs it should be OK.
>
>
>
> Can anyone tell me what's happening and how to fix this problem?
>
> Any help appreciated,
>
> Bob
>
>
>
>
>
>