Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 10th, 2006, 08:27 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I detect a shock in the schedules?

Hello everybody,
If I have this schedule:

            Monday Tuedays Wednesdays
Mathematics 8 10 11 12
Languajes 8 10

And on monday I have two different subjects at the same hour, how can I make a program on ASP to detect that I have two repeated hour the same day?. 8 10 means: From 8 AM to 10 AM.
Help me please.

 
Old April 10th, 2006, 08:39 AM
Authorized User
 
Join Date: Mar 2006
Posts: 26
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well,
To start of with, you need to put a bit of structure into your data. Start by defining a simple Subject structure that would include:

- Subject name
- Day of Week
- Start hour
- End hour

Once you have all the data (You haven't told us if you are using a formal database...) loop through the data and if you can find two rows with the same Start hour and end hour for the same day of the week, then you have spotted a schedule clash.

Cheers, Joel
 
Old April 10th, 2006, 09:05 AM
Registered User
 
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Joel and thanks for your quick answer.
I'm using an Oracle database and I already have the program with Forms and it works pretty well, but I have no idea on how to do it with ASP. I was trying a few codes, but it didn't work because first thing is that the data I have is Varchar and I don't know what command to use to get to the next hour, for example: in Oracle the way I do it is just like this: If substr(schedule,1,2) between substr(schedule1,1,2) and substr(schedule1,3,4) then
message('You have a clash...please verify');
End If;
If you have some code that could help me, I will be very thankful because I'm not a pro with ASP yet, only Oracle and Forms.
Thanks a lot!!.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect associated label ysiline Access VBA 1 April 26th, 2006 07:16 AM
Detect Username dparsons ASP.NET 1.0 and 1.1 Professional 2 April 12th, 2006 02:20 PM
Detect Number zaeem Classic ASP Databases 1 December 1st, 2003 03:02 AM
Flash detect Adam H-W Javascript 4 October 30th, 2003 08:00 AM
Flash detect Adam H-W Flash (all versions) 1 June 18th, 2003 08:56 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.