Re: Add new column is DBNULL
Putting fake data into a table sounds very wrong to me - it sounds as if the issue is with your application, not the database.
I'm not sure where the issue is or how to fix it, but that is what you should be trying to do.
Re: Add new column is DBNULL
How did you add the column to the table?
Usually we do it with an ALTER TABLE command and at first allow nulls.
Then update the column to a good value - such as 0 or "empty string" (or leave it null for a date).
Then if appropriate we ALTER TABLE again and set it to not allow nulls.
Re: Add new column is DBNULL
Hello,
I added the table by using management studio and right clicking on the table and select new column.
I clicked allow nulls.
Many thanks for any more help,
Re: Add new column is DBNULL
If you are doing it in management studio then don't allow nulls but instead when you add the column give it a default value - such as "" for an empty string or 0 for a numeric column.
That way the column is added to existing rows with this value.
Then remove the default - since it's only purpose was to pre-load values into existing rows.