Advertisement

12.13.2004 at 07:16AM PST, ID: 21240389
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.2

Too Few parameter

Asked by neicy62 in Active Server Pages (ASP)

Tags: , ,

Hi there...

I keep getting an error on my asp page that is telling me too few parameters.  I have gotten this error before but cannot remember how to fix it.
I have an htm page that the user puts in there id and the year they are looking for, this then goes to my asp page.  Here is the error and the code for the asp

ERROR

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 4.
/sickdays.asp, line 60
**********

CODE

<%@ Language=VBScript %>
<% Option Explicit %>
<%
 
           
     Dim objConn
     Dim rs
     Dim current_datetime

     'open up a connection
     set objConn = Server.CreateObject("ADODB.Connection")
     objConn.ConnectionString= "DSN=timesheet.dsn"
     objConn.Open
     
     response.expires = 0
     set rs = server.createobject("adodb.recordset")
     current_datetime = formatdatetime(date(), 1)

     Dim usersrch
     usersrch = request.form("cs_empid")            

%>

<html>

<head>
<title>SickDays</title>
<base target="_top">
</head>
<H1><FONT style=FONT-SIZE:30pt Face="Times New Roman" Color=#000080><B>Sick Days Report</FONT></B></H1>
<br>
<br>
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 >
<TR HEIGHT=18 >
      <TD WIDTH=4  ALIGN=LEFT> <BR></TD>
      <TD WIDTH=112  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:12pt FACE="Times New Roman" COLOR=#000080>ID</FONT></B></I></TD>
      <TD WIDTH=108  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>First Name</FONT></B></I></TD>
      <TD WIDTH=104  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Last Name</FONT></B></I></TD>
      <TD WIDTH=104  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Years of Service</FONT></B></I></TD>
      <TD WIDTH=148  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Date Worked</FONT></B></I></TD>
      <TD WIDTH=50  ALIGN=LEFT><BR></TD>
      <TD WIDTH=130  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Hours Absent With Pay</FONT></B></I></TD>
      <TD WIDTH=145  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Hours Absent Without Pay</FONT></B></I></TD>
      <TD WIDTH=148  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE="Times New Roman" COLOR=#000080>Absent Code</FONT></B></I></TD>
</TR>
</TABLE>

<%      

     Dim strSQL
     strSQL = "SELECT [Employee Info].ID, [Employee Info].First_Name, [Employee Info].Last_Name, [Employee Info].[Years of Service], timeperiod.date_worked, timeperiod.Hrs_abs_w_pay, timeperiod.Hrs_abs_wo_pay, timeperiod.Absent_code  " & _
        "   FROM [EmployeeInfo] INNER JOIN timeperiod ON [EmployeeInfo].ID = timeperiod.id " & _
          "     WHERE ((timeperiod.Absent_code)=11) AND employeeInfo.ID='"&usersrch&"';"            

     
     
     'create a recordset object
     Dim objRS
     Set objRS = Server.CreateObject("ADODB.RecordSet")
     objRS.Open strSQL, objConn,3,3

     If NOT objRs.EOF Then
       While Not objRs.EOF      
       Response.Write "<TABLE><TR><TD WIDTH=112 ALIGN=LEFT><B><I><FONT style=FONT-SIZE:12pt FACE=""Times New Roman""COLOR=#000080>"&(objRS("id"))&"</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=108  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("First_Name"))& "</FONT></B></I></TD>"    
       Response.Write "<TD WIDTH=104  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("Last_Name"))& "</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=104  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("YearsofService"))&"</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=148  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("Date_worked"))&"</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=108  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("Hrs_abs_w_pay"))&"</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=108  ALIGN=LEFT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("Hrs_abs_wo_pay"))&"</FONT></B></I></TD>"
       Response.Write "<TD WIDTH=148  ALIGN=RIGHT><B><I><FONT style=FONT-SIZE:11pt FACE=""Times New Roman"" COLOR=#000080>"&(objRS("Absent_code"))&"</FONT></B></I></TD></TR></Table>"    
       objRS.MoveNext
       wend
     End If

     'clean up ADO objects      
     objRS.Close
     Set objRs = Nothing
     objConn.Close
     Set objConn = Nothing
     
%>
</html>



Start Free Trial
[+][-]12.13.2004 at 07:31AM PST, ID: 12809938

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 07:35AM PST, ID: 12809975

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 07:53AM PST, ID: 12810185

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 08:11AM PST, ID: 12810431

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 08:18AM PST, ID: 12810511

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 08:27AM PST, ID: 12810624

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 08:36AM PST, ID: 12810721

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Active Server Pages (ASP)
Tags: too, odbc, parameters
Sign Up Now!
Solution Provided By: Colosseo
Participating Experts: 3
Solution Grade: A
 
 
[+][-]12.13.2004 at 10:27AM PST, ID: 12811751

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 11:25AM PST, ID: 12812212

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 11:27AM PST, ID: 12812231

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]12.13.2004 at 11:36AM PST, ID: 12812309

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.14.2004 at 04:19AM PST, ID: 12818362

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]12.16.2004 at 02:37AM PST, ID: 12838908

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.16.2004 at 03:02AM PST, ID: 12839039

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]12.16.2004 at 04:39PM PST, ID: 12846787

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32