Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Procedure sp_bindefault: error in SQL script
Message
De
10/07/2007 09:17:50
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Bases de données
Titre:
Procedure sp_bindefault: error in SQL script
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01238855
Message ID:
01238855
Vues:
56
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform