Connection string does not work

R

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
 
C

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
 
R

Robert Dufour

Using sql server 2000 and sql server 2005 (must run on both). I had tried
that before, same result.
BOB
 
V

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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top