query on ADDING NEW FIELD in database - URGENT

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 12 ans
Not working Bro.
Followed what exactly you said. But, it's giving following error!!

The 'PacksPerLayer' property on 'Product' could not be set to a 'null' value. You must set this property to a non-null value of type 'Int32'.
Il y a 12 ans
Christi, the step your missing is modifying the actual DB with your new column.  I'm assuming Area Code is for a phone number and you might want to allow a leading 0?  And you probably already have Customers in your DB so you need a default value

ALTER TABLE Customer
ADD AreaCode varchar(3) NOT NULL
CONSTRAINT CK_Customer_AreaCode DEFAULT ''


Also, remove the PacksPerLayer column.  That was wertyuio1's use and you wouldn't need it.
Il y a 12 ans
Yeah should have explained further it was a necessity for me to write up the document with the fields I needed... It was a generic document passed to my bosses.. Sorry for that!!
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.