Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old May 10th, 2003, 11:17 PM
pixel_ronin pixel_ronin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 8 pixel_ronin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
SQLDATE select statement to force reading from . . .

. . . a Access DB column.

Is it possible to force a *select* statement in include a db column?

Orginal:
SQLDATE = "SELECT * FROM Events WHERE # " & DateValue(dateSelect) & "# BETWEEN DateValue([Date]) AND DateValue([endDate]) Order By TimeValue([Date])"
RSDATE.Open SQLDATE, Conn, 1, 3

On my own:
SQLDATE = "SELECT * FROM Events WHERE Category = 'ballet' " & DateValue(dateSelect) & "'ballet' BETWEEN DateValue([Date]) AND DateValue([endDate]) Order By TimeValue([Date]) "
RSDATE.Open SQLDATE, Conn, 1, 3

This produces:
Microsoft JET Database Engine (0x80040E14)
Syntax error (missing operator) in query expression 'Category = 'dance' 5/1/2003 BETWEEN DateValue([Date]) AND DateValue([endDate])'.
/cms/cal/dance.asp, line 187

Line 187 is ->
RSDATE.Open SQLDATE, Conn, 1, 3

Thanks!
pr

Reply With Quote
  #2  
Old May 11th, 2003, 01:39 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 8 m 57 sec
Reputation Power: 9
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Could you try and explain it a bit more? I'm not sure what you're trying to do.
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #3  
Old May 11th, 2003, 03:55 AM
pixel_ronin pixel_ronin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 8 pixel_ronin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Talking got it!

Hey Stumpy -
I figured it out!
Thanks though for the reply!

Set RSDATE = Server.CreateObject("ADODB.Recordset")
SQLDATE = "SELECT * " _
& " FROM Events " _
& " WHERE # " & DateValue(dateSelect) & "#" _
& " BETWEEN DateValue([Date]) AND DateValue([endDate])" _
& " AND Category = 'dance' " _
& " ORDER BY TimeValue([Date])"
RSDATE.Open SQLDATE, Conn, 1, 3

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > SQLDATE select statement to force reading from . . .


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT