help needed pls

  • Thread starter Thread starter Ryteye
  • Start date Start date
R

Ryteye

Guest
:confused: Hi, am new here & i need some help with some access database. Its for a little project am using to learn access.

Ok am designing a website for an airline company using access as d database end & asp for coding & stuff. My problem is a table i called flight. I have to write out a flight schedule in d database but am not sure how to do it, i wrote a schedule down in words using days. let me explain that, what i did was i have about 10 countries my airline company flies to, so what i did was grp 5 countries to fly mondays,weds,fridays & sundays & d other 5 fly tuesdays,thursdays & saturday. I don't know how to put that in the table since in d frontend customers are supposed to be able to search by date. On the frontend is a drop down menu where they pick a date like 29th november 2004 & then it shows d flight details but my problem is i wrote it in days. what should i do?? :confused:
 
tblflights
FlightID - auto - pk
AirlineID - number
FlightNo - text - 10
DepFlightDate - date
ArrFlightDate - date
MaxWeightKilos - number
...other fields...

This is only one option and may not be good as something else, depends on how you are searching and how to get the flights info into the db.

How are you storing the data at the moment (table layouts)

Vince
 
ecniv said:
tblflights
FlightID - auto - pk
AirlineID - number
FlightNo - text - 10
DepFlightDate - date
ArrFlightDate - date
MaxWeightKilos - number
...other fields...

This is only one option and may not be good as something else, depends on how you are searching and how to get the flights info into the db.

How are you storing the data at the moment (table layouts)

Vince
thnx vince for d info, i actually have all that details, its depflightdate & arrflightdate i have issues with. i have put a schedule in there, not sure how. i think i have an idea how now, thnx pple
 
Last edited:
Ah I see

Ok, so you need to store:
Code:
FlightDay - number(number 1-7 - Sunday as 1 or monday as one and keep to that as the start of the week)
FlightNumber - text
DepFlightTime - date/time (just use the time section)
DepFlightCityID - number
ArrFlightTime - date/time (just use the time section)
ArrFlightCityID - number

Format(<dayfield>,"ddd",1) for sunday as start of week
Format(<dayfield>,"ddd",2) for monday as start of week


Vince
 
thnx vince, sorry ben busy, i tried using d date datatype for my depdate/arrivedate but i seem to be having problems when i try to call it up in asp, i tried d formatdatetime function but it just won't work, unless i put it as text but then i can't validate it. help :(
 
You didn't mention it was for Asp.

Best to create your own function to put the date as a string on the screen.
As to validating, the CDate function still works.

So you really need to know what the day is... hmmmm

DateDiff function - you could see if that is in there.
I'll think on it and post tomorrow - I have an asp book at home and it may have the functions in it.

Vince
 

Users who are viewing this thread

Back
Top Bottom