View Single Post
 
Old June 16th, 2004, 02:07 AM
om_prakash om_prakash is offline
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Set news_recordset = Server.CreateObject("ADODB.Recordset")
news_recordset.Source = "SELECT tdcdate, tdcmessage FROM news_messages WHERE date()% => tdcopendate AND =< tdcclosedate"
news_recordset.ActiveConnection = objConn
news_recordset.CursorLocation = 2
news_recordset.CursorType = 0
news_recordset.LockType = 1
news_recordset.Open()

I think there is spelling mistake, it shoule be "WHERE" and not "WERE".

If you are using SQL server, then
news_recordset.Source = "SELECT tdcdate, tdcmessage FROM news_messages WHERE getdate() between tdcopendate AND tdcclosedate"

If you are using Ms-Access, then
news_recordset.Source = "SELECT tdcdate, tdcmessage FROM news_messages WHERE date() between tdcopendate AND tdcclosedate"





Om Prakash