Click here to Skip to main content
15,884,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I am busy with a web page that allows the user to capture a new Appointment, represented by this table:
SQL
CREATE TABLE [Appointment](
    [Id] [int] IDENTITY(1,1) NOT NULL,
    [ClientName] [nvarchar](100) NOT NULL,
    [ClientId] [int] NULL,
    [DateTime] [smalldatetime] NOT NULL,
    [Hours] [int] NULL,
    [Subject] [nvarchar](100) NULL
) ON [PRIMARY]

The reason I have column ClientName is to make the capture process for a new appointment as quick and smooth as possible, even for a client that does not yet exist. If I had a non-nullable ClientId, the user would have to create a new client before continuing.

Then, the app should run a task to identify appointments with null ClientId values, and prompt the user into either capturing a new client, or assigning the correct existing client to the appointment.

Am I barking up the wrong tree here with this approach, and if so, what would you recommend?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900