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 March 9th, 2014, 11:51 AM
Registered User
Join Date: Mar 2014
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Searching by date

Can someone help me format this query so It accept input from the form text :) This is what I have so far


<form method="POST" action="temp02.asp">
<p><input type="text" name="txtBeginDate" size="20"></p>
<p><input type="text" name="txtEndDate" size="20"></p>
<p><input type="submit" value="Submit" name="B1"></p>

set conn=Server.CreateObject("ADODB.Connection")
conn.Open "C:\Inetpub\wwwroot\butlerapp\database\data.md b"

set rs = Server.CreateObject("ADODB.recordset")
rs.Open "SELECT * FROM shippers WHERE date Between #10/23/2013# AND #11/1/2013#" , conn

do until rs.EOF
for each x in rs.Fields
Response.Write(" = ")
Response.Write(x.value & "<br>")


Old February 10th, 2015, 01:33 AM
Posts: n/a
Default Good

PUA training teaches any male person the fine art of picking up girls.
Received Infraction
Old February 13th, 2015, 01:28 AM
Friend of Wrox
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts

It's been a really long time since I've done classic.


rs.Open "SELECT * FROM shippers WHERE date Between '" & Request.Form("txtBeginDate") & "' AND '" & Request.Form("txtEndDate") & "'; , conn

Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching Database Using Like gilbertsavier MySQL 1 July 31st, 2009 03:08 PM
Federated searching _abhi JSP Basics 0 December 27th, 2006 02:24 AM
Searching a String Hello_kitty Access 1 August 17th, 2005 09:45 AM
searching treasacrowe Classic ASP Databases 3 September 3rd, 2004 07:50 AM
Searching programmed C++ Programming 1 June 24th, 2004 01:08 AM

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