Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP + Time() + Access DB

Reply
Thread Tools

ASP + Time() + Access DB

 
 
Stuart
Guest
Posts: n/a
 
      06-25-2004
Hi all,

I have a problem that I just cannot figure out for the
life of me.

I am trying to set up a database that contains time slots
(6 X 4hr periods to cover the day) starting from 00:00:00 -
03:59:59 etc etc etc.

DB Fields look like this
| ID | EmailAdress | FromTime | ToTime |

Now once some one does an event of some sort, I wish to
email the person(s) contained with in the database.

The SQL string I am using in Select EmailAddress from
tblTable where #time()# BETWEEN FromTime and ToTime.

This however is causing me to get either 2 records (one is
correct one is wrong) displayed or no records displayed.

Am I doing this completely wrong? If so is there another
way?

Many thanks for help on this

Stuart
 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      06-25-2004
Since you have identical time slots for every day, why not just use TimeSlot
= 1, 2, 3, 4, 5, 6. Then have a lookup table if you want a nice display for
the actual time they used. Your ASP code can easily take a time and convert
it to a time slot, to pass into the query...

--
http://www.aspfaq.com/
(Reverse address to reply.)




"Stuart" <> wrote in message
news:210d101c45abf$9e479040$...
> Hi all,
>
> I have a problem that I just cannot figure out for the
> life of me.
>
> I am trying to set up a database that contains time slots
> (6 X 4hr periods to cover the day) starting from 00:00:00 -
> 03:59:59 etc etc etc.
>
> DB Fields look like this
> | ID | EmailAdress | FromTime | ToTime |
>
> Now once some one does an event of some sort, I wish to
> email the person(s) contained with in the database.
>
> The SQL string I am using in Select EmailAddress from
> tblTable where #time()# BETWEEN FromTime and ToTime.
>
> This however is causing me to get either 2 records (one is
> correct one is wrong) displayed or no records displayed.
>
> Am I doing this completely wrong? If so is there another
> way?
>
> Many thanks for help on this
>
> Stuart



 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      06-25-2004
Stuart wrote on 25 jun 2004 in microsoft.public.inetserver.asp.general:
> I am trying to set up a database that contains time slots
> (6 X 4hr periods to cover the day) starting from 00:00:00 -
> 03:59:59 etc etc etc.


Do not do that, it will fill your database withs lots of useless slots,
since you can define the slots with an ASP/vbs formula.

I suppose you want to fill the slots with data, so just make a database
with these data each having a discrete time. SQL if specific data falls
into a timeslot. You could use "where .. between .." for that.



--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Very annoying error: Access to the path is denied. ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity Jay ASP .Net 2 08-20-2007 07:38 PM
403 Forbidden: You were denied access because: Access denied by access control list Southern Kiwi NZ Computing 6 03-19-2006 05:19 AM
Access Denied to access db with asp.net Ros@ ASP .Net 3 02-22-2006 04:51 PM
Faster access to MDB? MS Access MDB and ASP =?Utf-8?B?UGhpbA==?= ASP .Net 8 01-27-2005 07:08 PM
How do I let people access the internet via an access point but not allow them access to my network yar Wireless Networking 4 09-21-2004 03:48 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57