Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Procedure sp_bindefault: error in SQL script
Message
From
10/07/2007 09:17:50
 
 
To
All
General information
Forum:
ASP.NET
Category:
Databases
Title:
Procedure sp_bindefault: error in SQL script
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01238855
Message ID:
01238855
Views:
57
Hello,

I have a SQL script for my database that produces this error message and I can't find the reason for it.
Msg 15103, Level 16, State 1, Procedure sp_bindefault, Line 178
Cannot bind a default to a column created with or altered to have a default value.
The command that raises this error looks like this:
CREATE TABLE ... [column1] [smallint] NOT NULL CONSTRAINT [DF_tablename_column1]  DEFAULT ((0)), ...
The script doesn't contain any other constraint with the same name or sets a second default value for this column. I even get this error when I change the command to allow NULL values and remove the constraint.
CREATE TABLE ... [column1] [smallint] NULL, ...
Very very strange things happen here ;-)

Thanks for help!
robert.oh.
Next
Reply
Map
View

Click here to load this message in the networking platform