0
votes

I'm trying to connect to SQL Server 2008 from a Classic ASP page:

Set conn = Server.CreateObject("ADODB.Connection") 
conn.ConnectionString = "
Provider= SQLOLEDB.1 
DataBase= MYDBNAME
Server= SERVERNAME\INSTANCE
Integrated Security = True
Trusted_Connection=Yes
Persist Security Info = False"

conn.Open -> error 80040e21 Multiple-step OLEDB operation generated errors
sql = "select * from UsersQuery where ID=" & ID
Set rs = conn.Execute(sql)

In SQL Server Log I can see that the connection was successful:

Login succeeded for user 'dbuser' Connection made using Windows Authentication.

What is causing the error?

Thank You.

1

1 Answers

0
votes

Does it works ?

Provider=SQLNCLI11;Server=ServerName\Instance;Database=MYDBNAME;Integrated Security=SSPI;DataTypeCompatibility=80;MARS Connection=True;