Blog : ASP SQL Query From HTML Input

ASP SQL Query From HTML Input

I am php coder and new to asp.

I am trying to build a simple login page using asp and the db connection works fine. When the user submit the form and at the sql query section i am getting the following error
"Microsoft OLE DB Provider for ODBC Drivers error '80040e14'"

How do i fix this ? Hope to find some solution here. Thanks in advance...
<%

if Request("btnLogin")="Login" then
'‘-------------------------------------------Get Form Fields--------------------------------‘
txtUsername = request.form("Username")
txtPassword = request.form("Password")

'‘--------------------------------------------Connect to Database-------------------------‘
Dim Conn, sqlstr
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "Driver={SQL Server};Server=ACER-PC\SQLEXPRESS;Database=UCTI;UID=sa;PWD=123;"

'‘-------------------------------------------SQL Statement---------------------------------‘
sqlstr = "SELECT FirstName,LastName,Status FROM Student WHERE FirstName= txtUsername  AND LastName =  txtPassword"

set rs = Conn.execute(sqlstr)

'‘-----------------------------------------Check if user exists---------------------------------‘
If rs.bof and rs.eof Then
response.Write("Access denied")
Else

Session("username") = txtUsername

Status = rs("Status")

  if Status = "Admin" then
  response.Redirect("welcome.asp")
  end if

  if Status = "Lecturer" then
  response.Redirect("welcome.asp")
  end if

  if Status = "External" then
  response.Redirect("welcome.asp")
  end if

End If
end if
%>
Username:
Password: