here is the entire error message:
Error Occurred While Processing Request
Error Executing Database Query.
Macromedia SequeLink JDBC Driver ODBC Socket MicrosoftODBC Microsoft Access Driver Too few parameters. Expected 2.
The error occurred in D:\
line 20
Called from D:\
line 10
Called from D:\
line 20
Called from D:\
line 10
18 : SELECT UserID, Username, Password, Company, FName, LName, AuthLevel
19 : FROM Users
20 : WHERE UserName='#FORM.UserLogin#' AND Password='#FORM.UserPassword#'
21 : </cfquery>
22 :
--------------------------------------------------------------------------------
SQL SELECT UserID, Username, Password, Company, FName, LName, AuthLevel FROM Users WHERE UserName='xxxx' AND Password='xxxxxxx'
DATASOURCE software
VENDORERRORCODE -3010
SQLSTATE 07002
Please try the following:
Check the ColdFusion
Application.cfm code:
<CFSET Datasource = "software">
<cfapplication
Name="zipscript"
Sessionmanagement="yes">
<cfinclude template="forceuserlogin.cfm">
forceuserlogin.cfm code:
<cflogin>
<cfif not(IsDefined("Form.UserLogin") AND IsDefined("Form.UserPassword"))>
<cfinclude template="ZipScript.cfm">
<cfabort>
<cfelse>
<cfquery name="GetUser" datasource="#DataSource#">
SELECT UserID, Username, Password, Company, FName, LName, AuthLevel
FROM Users
WHERE UserName='#FORM.UserLogin#' AND Password='#FORM.UserPassword#'
</cfquery>
<cfif GetUser.RecordCount EQ 1>
<cfloginuser
Name="#GetUser.UserID#, #GetUser.FName#, #GetUser.LName#, #GetUser.Company#"
Password="#Form.UserPassword#"
Roles="#GetUser.AuthLevel#">
<cfelse>
<script>
alert("You must login to access this area!");
</script>
<cfinclude template="ZipScript.cfm">
<cfabort>
</cfif>
</cfif>
</cflogin>
zipscript.cfm form code:
<cfform action="#CGI.SCRIPT_NAME#" name="UserLoginForm" method="Post">
<!---Make the UserLogin and UserPassword fields required--->
<input type="hidden" name="UserLogin_required">
<input type="hidden" name="UserPassword_required">
<table border="0" align="center">
<tr bgcolor="#000000">
<th colspan="2"><font color="#FFFFFF">Please Log In</font></th>
</tr>
<tr>
<th><font color="#FFFFFF">UserName</font>:</th>
<td>
<!---Text field for "User Name"--->
<cfinput Type="text"
Name="UserLogin"
Size="20"
Value=""
Maxlength="100"
Required="yes"
Message="Please type your Username"> </td>
</tr>
<tr>
<th><font color="#FFFFFF">Password:</font></th>
<td>
<!---Text field for "Password"---> <cfinput Type="text"
Name="UserPassword"
Size="20"
Value=""
Maxlength="100"
Required="yes"
Message="Please type your Password">
<input type="submit" value="Enter"> </td></tr></table><div align="center"></div></cfform>
Thank you for the assistance. (I believe I have included all the code referred to.)