ScottNomus
Programmer
I have had a lot of help concerning this but I am still not sure as to what else needs to be done concerning this form.
Here is the code from the two pages and the error message I am getting in the web browser.
1st. ***FORM***CODE****
</head>
<div align="center">
<p><img src="../images/Nomus%20Logo%20.JPG" width="335" height="256"></p>
<Form Method=Post Action="myasppage.asp">
<p>User Name
<input type="text" name="textfield" id="textfield">
</p>
<p>Password
<input type="password" name="textfield2" id="textfield2">
</p>
<p>Company
<select name="select" width="5">
</select>
</p>
<input type="submit" value="LogIn">
<input type="reset" value="Reset">
</form>
</div>
</html>
***2nd Form Code****
<div align="center">
<p><img src="../images/Nomus%20Logo%20.JPG" width="335" height="256"></p>
<p> </p>
</div>
<%
username=Request.Form("textfield"
pass=Request.Form("textfield2"
Session.timeout = 20
If IsObject(Session("WebCustomer_conn") Then
Set conn = Session("WebCustomer_conn"
Else
Set conn = Server.CreateObject("ADODB.Connection"
conn.open "WebCustomer","Admin",""
Set Session("WebCustomer_conn" = conn
End If
%>
<%
If IsObject(Session("RS_Frm_Password_customer") Then
Set tempRS = Session("RS_Frm_Password_customer"
Else
set RSUsername = conn.execute ("SELECT * User_table.Company, User_table.CompanyNum FROM User_table ORDER BY User_table.Company "
Set tempRS = Server.CreateObject("ADODB.Recordset"
tempRS.Open sql, conn, 3, 3
Set Session("RS_Frm_Password_customer" = tempRS
tempRS.MoveFirst
End If
tempRS.MoveLast
%>
<%
username=Request.Form("textfield"
pass=Request.Form("textfield2"
'verify password and user name
Session.timeout = 20
If IsObject(Session("WebCustomer_conn") Then
Set conn = Session("WebCustomer_conn"
Else
Set conn = Server.CreateObject("ADODB.Connection"
conn.open "WebCustomer","Admin",""
Set Session("WebCustomer_conn" = conn
End If
%>
<%
If IsObject(Session("RS_Frm_Password_customer") Then
Set tempRS = Session("RS_Frm_Password_customer"
Else
set RSUsername = ("SELECT User_table.Company, User_table.CompanyNum FROM User_table ORDER BY User_table.Company "
Set tempRS = Server.CreateObject("ADODB.Recordset"
tempRS.Open sql, conn, 3, 3
Set Session("RS_Frm_Password_customer" = tempRS
tempRS.MoveFirst
End If
tempRS.MoveLast
%>
****Error Message****
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '* User_table.Company'.
/web customer/myasppage.asp, line 25
All help Greatly appreciated.
Like I said I am really new to ASP and database connection.
Here is the code from the two pages and the error message I am getting in the web browser.
1st. ***FORM***CODE****
</head>
<div align="center">
<p><img src="../images/Nomus%20Logo%20.JPG" width="335" height="256"></p>
<Form Method=Post Action="myasppage.asp">
<p>User Name
<input type="text" name="textfield" id="textfield">
</p>
<p>Password
<input type="password" name="textfield2" id="textfield2">
</p>
<p>Company
<select name="select" width="5">
</select>
</p>
<input type="submit" value="LogIn">
<input type="reset" value="Reset">
</form>
</div>
</html>
***2nd Form Code****
<div align="center">
<p><img src="../images/Nomus%20Logo%20.JPG" width="335" height="256"></p>
<p> </p>
</div>
<%
username=Request.Form("textfield"
pass=Request.Form("textfield2"
Session.timeout = 20
If IsObject(Session("WebCustomer_conn") Then
Set conn = Session("WebCustomer_conn"
Else
Set conn = Server.CreateObject("ADODB.Connection"
conn.open "WebCustomer","Admin",""
Set Session("WebCustomer_conn" = conn
End If
%>
<%
If IsObject(Session("RS_Frm_Password_customer") Then
Set tempRS = Session("RS_Frm_Password_customer"
Else
set RSUsername = conn.execute ("SELECT * User_table.Company, User_table.CompanyNum FROM User_table ORDER BY User_table.Company "
Set tempRS = Server.CreateObject("ADODB.Recordset"
tempRS.Open sql, conn, 3, 3
Set Session("RS_Frm_Password_customer" = tempRS
tempRS.MoveFirst
End If
tempRS.MoveLast
%>
<%
username=Request.Form("textfield"
pass=Request.Form("textfield2"
'verify password and user name
Session.timeout = 20
If IsObject(Session("WebCustomer_conn") Then
Set conn = Session("WebCustomer_conn"
Else
Set conn = Server.CreateObject("ADODB.Connection"
conn.open "WebCustomer","Admin",""
Set Session("WebCustomer_conn" = conn
End If
%>
<%
If IsObject(Session("RS_Frm_Password_customer") Then
Set tempRS = Session("RS_Frm_Password_customer"
Else
set RSUsername = ("SELECT User_table.Company, User_table.CompanyNum FROM User_table ORDER BY User_table.Company "
Set tempRS = Server.CreateObject("ADODB.Recordset"
tempRS.Open sql, conn, 3, 3
Set Session("RS_Frm_Password_customer" = tempRS
tempRS.MoveFirst
End If
tempRS.MoveLast
%>
****Error Message****
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '* User_table.Company'.
/web customer/myasppage.asp, line 25
All help Greatly appreciated.
Like I said I am really new to ASP and database connection.