jeudi 12 février 2015

Database connection error with MSSQL 2005

I've got the following code and I'm trying to establish a connection to a data base. I have MSSQL 2005 as the database and trying to connect though ODBC connection.


Importantly I'm trying to use 'Windows authentication' instead of 'SQL authentication' to login to the database. (Note that SQL auth is NOT an option for me!)



<%

Dim Conn
Set Conn = CreateObject("ADODB.Connection")


Dim ConnectionString

Conn.ConnectionString = "Server= CLMSAWN002; Database= mohan_db; Integrated Security=True;"
Conn.Open ConnectionString


Conn.CommandTimeout=120

Sub CloseConn
Conn.Close
Set Conn = Nothing
End Sub

%>


In the live environment I get the following error.



Microsoft OLE DB Service Components error '80040e21'

Multiple-step OLE DB operation generated errors. Check each OLE DB
status value, if available. No work was done.

/CustomerMarketing/_db.asp, line 10

Can you help me understand what cause this and a possible solution?


Aucun commentaire:

Enregistrer un commentaire