Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old March 9th, 2014, 12:51 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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

<html>
<body>

<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>
</form>

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
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(x.name)
Response.Write(" = ")
Response.Write(x.value & "<br>")
next
Response.Write("<br>")
rs.MoveNext
loop

rs.close
conn.close
%>

</body>
</html>
Reply With Quote
  #2 (permalink)  
Old February 10th, 2015, 01:33 AM
jesse83y
Guest
 
Posts: n/a
Default Good

PUA training teaches any male person the fine art of picking up girls.
Reply With Quote Received Infraction
  #3 (permalink)  
Old February 13th, 2015, 01:28 AM
Friend of Wrox
Points: 2,101, Level: 18
Points: 2,101, Level: 18 Points: 2,101, Level: 18 Points: 2,101, Level: 18
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2003
Location: , , .
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

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

Try

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


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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



All times are GMT -4. The time now is 10:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.