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.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Delimiters for User input in SQL statement??
Old 02-22-2006, 11:16 PM Delimiters for User input in SQL statement??
Novice Talker

Posts: 14
Trades: 0
Hola Senor en Senora.

I have a question.

I wanted to ask about SQL conditions. My ASP collects input from User where the User selects a table from a drop down list. There are also 2 textboxes that takes in date from a pop-up calendar. These 2 textboxes are named dateOne and dateTwo respectively.

I can view the ASP page but when I select the date range & clicks Submit, I can only see the table's field columns. I don't know what went wrong. I do hope you guys could help me out. My SQL statement is as follows:
"SELECT * FROM " & Request.Form("tblInfo") & " WHERE reportdate BETWEEN # " & Request.Form("dateOne") & " # AND # " & Request.Form("dateTwo") & " # "

Are the delimiters correct? But why no values are displayed when User chooses the date range?? I welcome all opinions & ideas & also tips...
__________________
Marriage is the price men pay for sex. Sex is the price women pay for marriage.
DOLL is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-23-2006, 05:51 AM Re: Delimiters for User input in SQL statement??
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,528
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
delimeters are correct for Access.

write out the sql statement before the db call it looks like you have spaces between "#" and the date.
__________________
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 online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-24-2006, 12:23 AM Re: Delimiters for User input in SQL statement??
Novice Talker

Posts: 14
Trades: 0
Hole Senor. I have solved my error. Gracias Senor for helping me out.

It seems the problem lies in the display of the table. I've misplaced the tags <tr>..</tr>. And that's why I cannot print out the table. Gosh. I felt so stupefied. But luckily I have solved my problem. Pheewwwwwww..
__________________
Marriage is the price men pay for sex. Sex is the price women pay for marriage.
DOLL is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Delimiters for User input in SQL statement??
 

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.19027 seconds with 12 queries