Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 problems connecting through OLE DB

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-08-05 : 08:13:39
Paul writes "I'm having problems connecting through OLE DB. I have connected to SQL Server2000 many times before and am now unsure which way to turn. this is the connection string I am using.

ConnectionString = "Provider=SQLOLEDB.1;" & _
"Trusted_Connection=False;" & _
"User ID=johns;" & _
"Pwd=password" & _
"Initial Catalog=" & DB & ";" & _
"Data Source=" & DBServer

I have a SQL instance on this machine. If I try to connect using windows authentification then it works (by adding 'Integrated Security=SSPI;' and set 'Trusted_Connection=False'. This then doesn't work on a different instance on the network, although I can actually log onto that machine.) Both SQL instances have SQL Server and Windows authentification enabled and the username and password are ok with sufficient roles granted.

I would prefer to not use Windows authentification if possible. If anyone can shed any light or offer advice I would greatly appreciate."

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-08-05 : 08:14:49
The first thing I noticed is that you don't have a semicolon after the password value, to separate it from the Initial Catalog section.

Go to Top of Page
   

- Advertisement -