-
How to design sql table to store checklist information and more
Just so you know I'm new to VB and SQL.
I'm trying to create a form in vb.net. I've gotten as far as being able to show some of the data that I want, but I need to add a checklist to the bottom of the form and I can't seem to figure out how to design a SQL table that would store the checkbox fields. For example, I want to show the workorder number and the requester from a table called "TASKS" which I've done already, but I need to have another table to store the checkbox or checklist information. The checklist would contain all of the things that need to be done in order to setup a new user. I would have something like Add account to active directory, then a field that said the date it was completed, and them another field that had whom it was completed by. I'm thinking I would have to add the workorder number field in the table so the two tables could be joined.
Any ideas on how I should go about creating a sql table to store this kind of information? If there's a better way to accomplish what I'm trying to do, I'd like to hear that also. Thanks
-
Sounds like you want something like this...
CREATE TABLE Checklist
(
TaskID int NOT NULL,
Item1 bit DEFAULT 0,
Item1Date datetime,
Item2 bit DEFAULT 0,
Item2 datetime,
Item3 bit DEFAULT 0,
Item3 datetime
...
)
Where TaskID is your foreign key to your TASKS table.
Just create a column for each checklist item, and a date column if you want to log the date it was 'ticked'. Use a boolean column, ie 1 to denote its completed.
Hope this helps..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|