Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Teradata error on Virtual Machine

Avatar of baxtalo
baxtalo asked on
ASPEnterprise Software
8 Comments1 Solution934 ViewsLast Modified:
I moved my web site to a different server. The code attached worked fine on the old server, but on the new one it gives me an error, in spite of the fact that all necessary software is installed on the new server (ODBC Driver for Teradata, etc.)
With this code I capture the login ID, then display the info of the logged in person.
Can anyone please let me know why it's not working?
Thank you very much.
If Request.ServerVariables("LOGON_USER") = "" Then
Response.Status = "401 Access Denied"
End If
set conn = Server.CreateObject("ADODB.Connection")
conn.Open "DSN=Teradata;DRIVER={Teradata};UID=MyUID;PWD=MyPWD;Persist Security Info=True;"

set rs = Server.CreateObject("ADODB.recordset")

Dim UserID
UserID = Request.ServerVariables("LOGON_USER")
'if always 3 character User ID with '\'
UserID = Mid(UserID, 5)
rs.Open "SELECT Emp_Id, Last_Name, First_Name, Pref_First_Name FROM EmpDirectory WHERE Emp_Id = '" & UserID & "'", conn

do until rs.EOF
Emp_Id = rs("Emp_Id")
First_Name = rs("First_Name")
Last_Name = rs("Last_Name")
Pref_First_Name = rs("Pref_First_Name")

Avatar of madgino
madginoFlag of Romania image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 8 Comments.
See Answers