hi.. i'm using sql server 7.0 and visual basic 6.0 to develop a system for a project in one of the module that i'm studying. i've encountered 2 problems here.. hope someone here can help me..
1. this is one of the table in the database..
Create Table RepairRecord
(RR_Id char(10) Not Null, RDate datetime Not Null,
RTime datetime Not Null,
ENG_Id char(10) Not Null,
SA_Id char(10) Not Null,
Primary Key (RR_Id),
Foreign Key (ENG_Id) References Engineer(ENG_Id),
Foreign Key (SA_Id) References ServiceAgreement(SA_Id));
is the attributes highlighted in bold correct? and in RTime, i've declared the datatype as datetime.. but actually i just want it to show only time.. how do i do that?
2. there's a requirement that we need to give our lecturer a soft copy of this whole system. well, just don't want to waste any CD-R, how to burn everything in the cd and it will work fine using the cd itself? i once tried to burn one but can't run cos it said can't find database...
well.. visual basic is the front-end while sql is the back-end..
so, anyone can help??
I'd use a single column to store both the date and time. You can easily manage the display of one or the other, or both. It makes all kinds of temporal (time based) code simpler if you leave the date and time together.
As for the issue of the CD, a database can be made readable on CD, but that has very limited usage simply because it is read only. You can detach or backup a database and burn the files to a CD, but they need to be copied/restored back to disk to be fully usable. Using a CD-R would be a performance disaster, but it might work. It is tough to give you much guidance without a lot more insight into what you are actually trying to do.