Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
0
Reply
Looping through a checkboxlist. Table needs fixing.
matt cupryk
Jan 16 2010 6:27 PM
3.1k
Reply
Reference to the following article:
http://www.codersbarn.com/post/2008/10/12/Bind-CheckBoxList-to-DataSet.aspx
I created the following table
1) Should I set all the MusicFeature values by default to zero.
2) How should I create foreign constraits. ProfileID.
3) ProfileID is used in a tbl_Prrofile and is a primary key.
4) How should this table be fixed. Also I need to keep in mind what should be null.
CREATE
TABLE
[dbo]
.
[tbl_Music]
(
[MusicID] [int]
IDENTITY
(
1
,
1
)
NOT
NULL,
[ProfileID] [int]
NULL,
[MusicText] [nvarchar]
(
64
)
NOT
NULL,
[MusicFeature] [bit]
NULL,
CONSTRAINT
[PK_tbl_lookup_music]
PRIMARY
KEY
CLUSTERED
(
[MusicID]
ASC
)
WITH
(
PAD_INDEX
=
OFF
,
STATISTICS_NORECOMPUTE
=
OFF
,
IGNORE_DUP_KEY
=
OFF
,
ALLOW_ROW_LOCKS
=
ON
,
ALLOW_PAGE_LOCKS
=
ON
)
ON
[PRIMARY]
)
ON
[PRIMARY]
--------------------------------
CREATE
TABLE
[dbo]
.
[tbl_Profile]
(
[ProfileID] [int]
IDENTITY
(
1
,
1
)
NOT
NULL,
[UserID] [nvarchar]
(
50
)
NULL,
[UserName] [nvarchar]
(
50
)
NULL,
CONSTRAINT
[PK_tbl_Profile]
PRIMARY
KEY
CLUSTERED
(
[ProfileID]
ASC
)
WITH
(
PAD_INDEX
=
OFF
,
STATISTICS_NORECOMPUTE
=
OFF
,
IGNORE_DUP_KEY
=
OFF
,
ALLOW_ROW_LOCKS
=
ON
,
ALLOW_PAGE_LOCKS
=
ON
)
ON
[PRIMARY]
)
ON
[PRIMARY]
TEXTIMAGE_ON
[PRIMARY]
GO
SET
ANSI_PADDING
OFF
-----------------------------------
tbl_Music.
MusicID ProfileID MusicText MusicFeature
1
NULL
Prefer not to say
NULL
2
NULL
African
NULL
3
NULL
Blues
NULL
4
NULL
Caribbean
NULL
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
mutiple images
problem in adding record to a database...