[My wrong code:]
Data = "Provider=sqloledb;" & _
"Data Source=TPNT;" & _
"Initial Catalog=BD;"
Dim Conn, SQL, rs, fsw
Set Conn = CreateObject("ADODB.Connection")
Conn.Open Data
HandleErrors Err.Number, Err.Description, BreakPoint
SQL = "..."
Set rs = Conn.Execute(SQL)
...
[Errors I got:]
C:\data\junk>cscript test.vbs
...
C:\data\junk\test.vbs(13, 4) Microsoft OLE DB Provider for SQL Server: Login failed for user 'test'.
[here:]
IIS didn't pass full nt user information "domain\test" to SQl sever, only passed "test" as a sql login.
[right code:]
Data = "Provider=sqloledb;" & _
"Data Source=TPNT;" & _
"Initial Catalog=BD;" & _
"Integrated Security=SSPI;"
...
Works!
Data = "Provider=sqloledb;" & _
"Data Source=TPNT;" & _
"Initial Catalog=BD;"
Dim Conn, SQL, rs, fsw
Set Conn = CreateObject("ADODB.Connection")
Conn.Open Data
HandleErrors Err.Number, Err.Description, BreakPoint
SQL = "..."
Set rs = Conn.Execute(SQL)
...
[Errors I got:]
C:\data\junk>cscript test.vbs
...
C:\data\junk\test.vbs(13, 4) Microsoft OLE DB Provider for SQL Server: Login failed for user 'test'.
[here:]
IIS didn't pass full nt user information "domain\test" to SQl sever, only passed "test" as a sql login.
[right code:]
Data = "Provider=sqloledb;" & _
"Data Source=TPNT;" & _
"Initial Catalog=BD;" & _
"Integrated Security=SSPI;"
...
Works!