Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL server login fail 2

Status
Not open for further replies.

johnv20

Programmer
Sep 26, 2001
292
0
0
US
Hi,
I'm trying to connect to an SQL server using the following script:

DSN = "DSN=Burn";
Conn = Server.CreateObject("ADODB.Connection");
Conn.Open(DSN);

But keep getting the error msg:
Login failed- User: Reason: Not associated with a trusted SQL Server connection.

I know that my ODBC settings are correct as I use these for normal SQL scripting every day with no problems and the data source tests sucessfully. Could somebody please tell me what I'm doing wrong
 
The DSN is on your machine or on the Server? ________
George, M
 
DSN is on my machine which is also being used as the web server. The DSN has been configured with the sa login. Any help at all would be greatly appreciated
 
U tested the DSN when u create it?
...
I use to a DSN connexion but it is kind of slow when u are using offten, but i give up.
Try to use a DSN less connexion...
here is my example:
Code:
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;PWD=;Initial Catalog=databasename;Data Source=sqlservername"

________
George, M
 
You need to ensure the correct security settings on the Server.
Open the Enterprise manager
Right click the server and choose properties
Goto the security tab and ensure Authentication is set to "SQL Server and Windows"
(I had this exact same problem last week)

Sam
 
Hi, just 1 more small problem is the provider name SQLEDB.1
and if so how do I configure this.

Thanks,
John
 
I place the right TGML tags but for nothing
it is S Q L O L E D B . 1 ________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top