HII,
i have a column in sql srver 2000 of data type bit.I have a checkbox in my page. i want to assign bit value to the column when the check box is checked and un checked,but i am getting errors when assigning true /false to the column.
greeny_1984 14 Posting Whiz
Recommended Answers
Jump to PostDatatype bit takes the value 0 or 1.....if true then 1
if false then 0
Jump to Postgreeny, can you please post the code where you "built" [anndept.announceToFaculty] ?
anndept is a boolean variable, which it can only be set to true and false. When you declared anndept, you declared it as a boolean. Is anndept the column you are trying to update? In order to help …
Jump to Postthe reason why you cannot set anndept.announceToFaculty to an integer (1 or 0) is because you declared it as a boolean [public bool announceToFaculty]. You can change it to an integer by setting the above declaration to "public int announceToFaculty] and you will be able to set it to (1 …
Jump to Postwow. that's a long thread for a simple problem.
Jump to PostSir, you have this right here:
public bool announceToFaculty;
Which means you can only assign true or false to it. If you are not allowed, change this part to:public int announceToFaculty;
And assign 1/0.
All 19 Replies
btech_Saurabh 0 Light Poster
greeny_1984 14 Posting Whiz
btech_Saurabh 0 Light Poster
greeny_1984 14 Posting Whiz
btech_Saurabh 0 Light Poster
greeny_1984 14 Posting Whiz
btech_Saurabh 0 Light Poster
greeny_1984 14 Posting Whiz
btech_Saurabh 0 Light Poster
greeny_1984 14 Posting Whiz
btech_Saurabh 0 Light Poster
SheSaidImaPregy 28 Veteran Poster
greeny_1984 14 Posting Whiz

fatihpiristine
SheSaidImaPregy 28 Veteran Poster
ericstenson 5 Posting Whiz in Training Team Colleague
greeny_1984 14 Posting Whiz
SheSaidImaPregy 28 Veteran Poster
greeny_1984 14 Posting Whiz
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.