Storing Data

J

JP SIngh

Hi All

I am writing an ASP application that deals with the TV tapes and two of the
fields is what I am having issues with

I need to store the duration of the program i.e. DURATION field only to
accept Numerical entries in the form 000:00:00 (min:secs:frames)

I also need to store the TIMECODE field only to accept Numerical entries in
the form 00:00:00:00 (hours:mins: secs:frames)

Does anyone know

1. What datatype should I be using in my Access 2000/ 2003 database.

2. How can I validate this field when allowing users to add the correct
data.

Thanks in advance for your help.
 
B

Bob Barrows [MVP]

JP said:
Hi All

I am writing an ASP application that deals with the TV tapes and two
of the fields is what I am having issues with

I need to store the duration of the program i.e. DURATION field only
to accept Numerical entries in the form 000:00:00 (min:secs:frames)

Duration is defined as a number of time units. It looks like you are trying
to store two separate things: duration and frames. Does "frames" refer to a
number of frames? Or the identity of the frames? In either case, it looks to
me as if two columns are needed, one for duration time, and the other for
duration frames, especially if any calculations need to be done with the
values.
I also need to store the TIMECODE field only to accept Numerical
entries in the form 00:00:00:00 (hours:mins: secs:frames)

Is this a duration? Or an identification of a certain point within the tape?
Does anyone know

1. What datatype should I be using in my Access 2000/ 2003 database.

It depends (see above). In any case, you need to stop confusing the data
storage (no format needed) with the data display/entry (formatting applied).
There is absolutely no need to store a duration in minutes and seconds. A
duration is a number of time units. Since you need to display minutes and
seconds, then the time unit you need to store is seconds. At display-time, a
function can be easily written to convert a number of seconds to a string
containing minutes:seconds.

If you decide that you absolutely need to store the data with the formatting
applied, then the only datatype that will work is Text (varchar if SQL
Server).
2. How can I validate this field when allowing users to add the
correct data.

What type of validation?

Bob Barrows
 
B

Bullschmidt

You might want to consider using more than one field...

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...

<<
I need to store the duration of the program i.e. DURATION field only to
accept Numerical entries in the form 000:00:00 (min:secs:frames)...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,234
Latest member
SkyeWeems

Latest Threads

Top