473,811 Members | 3,610 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ASP + Time() + Access DB

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
Jul 19 '05 #1
2 1686
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" <an*******@disc ussions.microso ft.com> wrote in message
news:21******** *************** ******@phx.gbl. ..
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

Jul 19 '05 #2
Stuart wrote on 25 jun 2004 in microsoft.publi c.inetserver.as p.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)
Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1722
by: rbt | last post by:
I'm using the standard NTFS file system. The only time the access time is updated is when the file is modified or saved (with no changes). What's up with that? Shouldn't a read/view update the access time?
4
4232
by: Mark Reed | last post by:
Hi all, I have a query (query1) which shows scan date, scan time & operator. One scan = 1 record. What I want to do is create a report based on query 2 from query1 which shows all the scans AND the difference between each scan. Something like below. I have spent days on this and can't figure it out. Date Time Login Diff 04-Dec-03 23:33:12 27478 04-Dec-03 23:33:38 27478...
7
2038
by: Morley | last post by:
1. Is the run time version a self-contained file which includes Access files and a database or are there separate Access files and a database (.mdb) file? 2. If the database file is separate, can other database files (.mdb) be run on a machine that has only the run time version installed? Thanks, Morley
2
2163
by: Steve Miller | last post by:
hello... i am a 'user' of access, meaning, i import excel files, join, and merge....that's about the extent of my expertise with ms-access. my boss wants me to create an access application that will replace our 'excel' version of time reporting. we use ms-access 2000. i have a huge book (mastering access 2000) though the cd is missing. i looked at using the wizard for time reporting, but is was designed for external clients, and the...
3
2726
by: luscus | last post by:
Thanks for all the responses on my first question. Unfortunately the answers I was given were too complicated for my small brain , and neophite condition to understand. So if you could talk down to me and write in easier terms I would be very gratefull to all you access wizards! Here is my problem. I have a table with maybe 10 fields, It is used to imput information taken over the phone to solve patient problems in our Spanish...
9
3230
by: Bob Achgill | last post by:
I would like to use the timestamp on files to manage the currency of support files for my VB windows application. In this case I would only put the timestamp of the file in the management database and not the file itself. To do this I will need to have a File class property for Create time and date that will let me "set" the Create time and date of the file to my own chooseing. The VB file class does not appear to have the ability
5
4931
by: Takeadoe | last post by:
Gang - I'm generating date and time variables from scanned forms. Currently, the date and time values are as follows: 06/26/2006 and 11:30 AM. I've written VBA code to combine them into a single string. The resulting variable - datetime - is exported automatically to Access. When it get's there it looks like "06/26/2006 11:30 AM". Problem is, it is a string. If I set up the database before it is populated with records and set the...
3
3320
by: Jim in Arizona | last post by:
I have a gridview that's being populated from an access db query. The problem I'm having is that the date/time fields in access that are populating the gridview are showing both date and time, when the field should only be showing one or the other (date or time). Even on the back end of the database where the column properties are, I have chosen the smallest date/time formats. When the aspx page runs, it shows the date and time (ie:in a...
9
2101
by: pob | last post by:
I currently have a procedure that loops thru a recordset to determine what files need to be loaded to my database. The naming convention of the files has always been accounts.txt, namelist.txt, etc. Within the procedure I also validate that the file loaded to the server was loaded within the current day. Everything has run smooth for quite some time using this method. Now the vendor has told me he has choice, but to the send the file...
3
3399
by: Paul H | last post by:
Most of my projects are developed in Access 2003. I have not even installed Office 2007 yet! I need to buy VSTO to get the run-time licence for Access 2003. No doubt I will soon need a run-time licence for Access 2007. Is there a version of VSTO that has the Access run-time licence for both version of Access? Or will I need to buy VSTO 2003 now and then VSTO 2007 at a later date? Thanks,
0
9724
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10394
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10127
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9201
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5690
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4336
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3863
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.