Reg Database connection

tell_siva
01-13-2004, 10:51 AM
Set adoConnection = New adodb.Connection

With adoConnection
.ConnectionString = "UID=tt;PWD=ttt;" _
& "DRIVER={SQL Server};DATABASE=pubs;" _
& "SERVER= TEST2 ;"

.Open
End With


In the above statement , is there anything wrong ?
I am not able to establish the connection.

Do we need to configure anything in my system for the Driver = { SQL Server } before running this statement..

What are all the things I should make sure before running the above statement ?

FYI, I am able to connect to SQL Query Analyser for this Database in this server giving the above user id and password.


Pls reply..

Thanks..

rufen101
01-13-2004, 10:54 AM
Take a look at this ... should help you

http://www.able-consulting.com/MDAC/ADO/Connection/ODBC_DSNLess.htm#ODBCDriverForSQLServer

Naghual
01-13-2004, 11:03 AM
This may occures because of spaces before and after server name.

MKoslof
01-13-2004, 11:06 AM
before trying to configure your SQL Server settings...make sure you have the connectionstring correct, the above connection string is not correct: review this web page for a list of proper connection strings..

http://www.connectionstrings.com/

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum