Default bit value



    I'm using SQL server 2005 for db and .NET 2.0 as framework and C# as the language for my application.


    In the application, when a new user joins the site, along with the user's other values a bit value is set in the db to indicate the user status. This bit value is set as a default 1 in the db and is not passed as a parameter and allow null is checked.


    The problem is the bit value is not setting to 1 at all times. It sometimes is set as 0 though the default value is 1. At times even after re-setting the value back to 1, it is automatically changing to 0 again.


    I'm not sure what is causing this change. There is no code that is setting this value.

    There is no pattern to identify this chagne either. At times, a batch of users are set to 0, after some time all users joining the site are set to default value of 1.


    Will explicitly passing this bit value as a parameter help stop this problem?

    Can anyone help me in figuring why this automatic change in bit value is occuring?
    Wednesday, June 18, 2008 1:24 PM


  • It might be a good idea and check to see if that table has any triggers that are doing things behind the scenes.


    Wednesday, June 18, 2008 2:57 PM

All replies