Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 19th, 2006, 11:40 PM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default Error Type: (0x80040E10)

Hola, como estas?

I have a problem here. Hope you people could enlighten me with my mistake. ;) I have an error message as such:
(0x80040E10) : No values given for one or more required parameters.

I have an ASP page that displays tables from a [u]drop down list</u> & also a Date Function where the User specifies the date ranging from the input given. I am not so good in SQL statements & so I think that my error appeared due to my SQL statement. My date format in the table are in [u]medium date.</u>
In my SQL statement, I retrieved the values selected from the drop down list & also from the date range :

"SELECT * FROM " & Request.Form("tblInfo") & " WHERE [u]reportdate</u> BETWEEN " & Request.Form("Box1") & " AND " & Request.Form("box2")

Erm. I have already checked with my SQL statement & did all kinds of correcting it but it still creates the error message. What did I do wrong actually? I welcome all opinions, remarks & answers. Gracias.


* Love me for a reason; Let the reason be love *
__________________
* Love me for a reason; Let the reason be love *
 
Old February 20th, 2006, 06:23 PM
Authorized User
 
Join Date: Feb 2006
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi InsouciantCoquette !

Do you have access DB ?

"SELECT * FROM " & Request.Form("tblInfo") & " WHERE reportdate BETWEEN #" & Request.Form("Box1") & "# AND #" & Request.Form("box2")&"#"

Ciao Steweb



My English is very bad , excuse me !

www.steweb.net
 
Old February 21st, 2006, 03:22 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

Put this code on your page and post the results here so we can see exactly what is being sent to your database.

SQL = "SELECT * FROM " & Request.Form("tblInfo") & " WHERE reportdate BETWEEN " & Request.Form("Box1") & " AND " & Request.Form("box2") ;"

Response.Write SQL
Response.End

Also, you can refer to this link.

http://www.adopenstatic.com/faq/80040e10.asp

Te vayas bien,
Richard

 
Old February 22nd, 2006, 09:40 PM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default

Hola.
Thanks for replying to my Topic.
rsTelma. This is the error message:
Technical Information (for support personnel)

Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/PROJECT/work_display.asp, line 79, column 153
cmd.CommandText = "SELECT * FROM " & Request.Form("tblName") & " WHERE reportdate BETWEEN " & Request.Form("dateOne") & " AND " & Request.Form("dateTwo");"
--------------------------------------------------------------------------------------------------------------------------------------------------------^

Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)

Page:
GET /PROJECT/work_display.asp

Time:
Thursday, February 23, 2006, 9:27:29 AM


More information:
Microsoft Support

Erm..I seriously couldn't find a solution to solve my problem. I really hope you guys could help me enlighten my brain. It really is sucking off my energy just spending the time searching for the error in my codes.


* Love me for a reason; Let the reason be love *
 
Old February 22nd, 2006, 09:48 PM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default


Thanks Steweb for replying to my topic.

Well, I have already followed as such and there seems to be [u]no</u> error but the funny thing was only the [u]selected</u> table [u]and</u> their field names appeared and not together with the values.

What could have gone wrong?? The codes for displaying the table after selection from drop down list & specifying the date range are just these:
Code:


    <% Response.Write cmd.CommandText %>
    <p>You have selected : <b><%=Request.Form("tblName")%></b></p>
                <table border="1" width="50%" cellpadding="0" cellspacing="0"


    <tr>
    <% for each x in rs.Fields
    Response.Write("<th>" & x.name & "</th>")
    Next %>
    </tr>            
    <% do until rs.EOF %>
    <tr>                
    <% for each x in rs.Fields %>
    <td><% Response.Write(x.value) %></td>
    <% Next
    rs.MoveNext
 Loop %>    
    </tr>


I seriously don't know what's wrong with my codes. Unless I'm really ignorant, but I don't think so... :(

* Love me for a reason; Let the reason be love *
 
Old February 22nd, 2006, 09:57 PM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default


Hola Senor en Senora
I will post my codes here. Hope you'd be able to get a clear view of how I do my codes *note that I'm still new to ASP + Access*


<head>
<script language="JavaScript" src="popcalendar.js"></script>

<title>View Tables > 2004</title>

</head>
<body>

<H1>View Tables > 2004</H1>
<p>Please select a table:</p>

<% ' ***********Display table in FORM1*********** %>

<form method="Post" action="" name=Form1>

<SELECT name="tblName">

<%
    Set DB = Server.CreateObject("ADODB.Connection")
    DB.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" _
    & "Data Source=D:\DB\Mar05.mdb"
    DB.Open

    Set cmd = Server.CreateObject("ADODB.Command")
    Set rs = Server.CreateObject("ADODB.Recordset")
    cmd.CommandText = "SELECT DISTINCT tablename FROM t_tablenames"
    cmd.ActiveConnection = DB
    Set rs = cmd.Execute
%>
<%
    Do while not rs.EOF
         If Request.Form("tblName") = rs("tablename") then
           Response.Write "<OPTION VALUE = '" & rs("tablename") & "' SELECTED>"
               Response.Write rs("tablename") & "</Option>"
    rs.MoveNext
    else
           Response.Write "<OPTION VALUE = '" & rs ("tablename") & "'>"
           Response.Write rs("tablename") & "</Option>"
    rs.MoveNext
    end if
    loop
%>
</SELECT>

<br>
<p><b>Select the date range: <input type="textbox" name=dateOne>
    <script language='javascript'>
        <!--
        if (!document.layers) {
        document.write("<input type=button onclick='popUpCalendar(this, Form1.dateOne, \"dd-mmm-yyyy\")' value='select' style='font-size:11px'>")
                }
        //-->

    </script>
To: <input type="textbox" name=dateTwo>
    <script language='javascript'>
        <!--
        if (!document.layers) {
        document.write("<input type=button onclick='popUpCalendar(this, Form1.dateTwo, \"dd-mmm-yyyy\")' value='select' style='font-size:11px'>")
                }

        //-->
    </script>
<input type="submit" value="View" name=submit>
</form>


<%
If Request.Form("submit") = "View" Then

    cmd.CommandText = "SELECT * FROM " & Request.Form("tblName") & " WHERE reportdate BETWEEN " & Request.Form("dateOne") & " AND " & Request.Form("dateTwo");"
    cmd.ActiveConnection = DB
    Set rs = cmd.Execute
%>


    <% Response.Write cmd.CommandText %>
    <p>You have selected : <b><%=Request.Form("tblName") %></b></p>
    <table border="1" width="50%" cellpadding="0" cellspacing="0"


<tr>
<% for each x in rs.Fields
Response.Write("<th>" & x.name & "</th>")
Next %>
</tr>

<% do until rs.EOF %>
<tr>
<% for each x in rs.Fields %>
<td><% Response.Write(x.value) %></td>
<% Next
rs.MoveNext %>
</tr>

<% Loop
End If
%>


* Love me for a reason; Let the reason be love *
 
Old February 23rd, 2006, 04:12 AM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default

Gosh people. Can I have some attention here? *Cry* I'm going crazy just trying to fix this error...............

* Love me for a reason; Let the reason be love *
 
Old February 23rd, 2006, 05:25 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

The line...
Code:
cmd.CommandText = "SELECT * FROM " & Request.Form("tblName") & " WHERE reportdate BETWEEN " & Request.Form("dateOne") & " AND " & Request.Form("dateTwo");"
should be...
Code:
cmd.CommandText = "SELECT * FROM " & Request.Form("tblName") & " WHERE reportdate BETWEEN " & Request.Form("dateOne") & " AND " & Request.Form("dateTwo") & ";"
HTH,

Chris

 
Old February 24th, 2006, 12:13 AM
Authorized User
 
Join Date: Jan 2006
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to InsouciantCoquette Send a message via Yahoo to InsouciantCoquette
Default


I have solved my problem! Yippee!! :D The problem lies in my misplacements of the tags <tr>...</tr> I have also impost an If...Else statement to handle 2 submit buttons (which I never did before in my entire study life) & it worked!!! Phew..Really glad. Gracias people for helping me out in here. :) I really appreaciated the help.


* Love me for a reason; Let the reason be love *





Similar Threads
Thread Thread Starter Forum Replies Last Post
hi i got runtime error 13 Type Mismatch error sriharsha345 Access VBA 2 February 21st, 2008 09:30 AM
Error Type: (0x80004005) Unspecified error wilfree Classic ASP Databases 3 April 3rd, 2007 09:04 AM
Error:0x80040E10 -Too few parameters. expected 1 mikest Access ASP 2 December 5th, 2004 10:31 PM
Microsoft JET Database Engine (0x80040E10) knight Classic ASP Databases 12 June 9th, 2004 01:07 AM
Data Type error but it is the correct type Mitch SQL Server 2000 2 March 19th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.