I changed a datatype from 'bit' to 'binary' and when i clicked save table i got the follown error:
Error: There is already an object named 'PK_Users_Temp' in the database. Could not create constraint. See previous errors.
Source: .Net SqlClient Data Provider
The table I altered was named Users. I was able to alter other tables, but this one threw errors. Anyone have any ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now, I noticed that ASP.net EM creates an extra table called <table_name>_TEMP .
Can't see why, there's no essential need for an extra table for doing an Alter Table or corresponding.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I changed a datatype from 'bit' to 'binary' and when i clicked save table i got the follown error:
Error: There is already an object named 'PK_Users_Temp' in the database. Could not create constraint. See previous errors.
Source: .Net SqlClient Data Provider
The table I altered was named Users. I was able to alter other tables, but this one threw errors. Anyone have any ideas?
I could reproduce the problem at my installation.
Seems like it's doing something stupid behind the curtain. I don't have these parts of the source code at hand
so I can't check it out any deeper.
But, as a work-around you can do the column type change with SQL:
alter table your_table alter column the_column binary NOT NULL
(assuming that you want Not Null, of course. There might be other column properties you might want to set
using the ALTER COLUMN statement also).
Best regards,
Coolberg
Now, I noticed that ASP.net EM creates an extra table called <table_name>_TEMP .
Can't see why, there's no essential need for an extra table for doing an Alter Table or corresponding.