Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

ASP.NET Forum


You are currently viewing our ASP.NET Forum as a guest. Please register to participate.
Login



Reply
Old 04-21-2006, 03:36 PM Comparing Date field
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
i want to pull all orders from the database that is less than the Date the Order Entry entered.

DateSubmit -- is the date in the database as a Date field
Date -- is the date enter by the Order entry

rs.Open "Select * from tblTestOrder, tblCustomers where CustomerID = CustID AND DateSubmit = '" &Date& "'", conn

right now, it pulls all order with or without "DateSubmit= '"&Date& "'".
When i take out the quotation around DATE; i got an 0x80040E10 error.

please help
barbara is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-21-2006, 04:27 PM Re: Comparing Date field
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
What's the database? if it is Access it may need "#" delimiters around the date

date in ASP will return the current system date so the query in your example will be getting records where the entry date is equal to the current date

somewhere in there you need to be using a JOIN statement as the way the query is set is very inefficient

do you need all fields from both tables?
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-24-2006, 02:58 PM Re: Comparing Date field
barbara's Avatar
Skilled Talker

Posts: 79
Trades: 0
thanks.
barbara is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Comparing Date field
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11440 seconds with 12 queries