Using Visual Studio 2012 (VS2012) with SQL Server Data Tools (SSDT) I am receiving this error after attaching the database project to StarTeam 2009 R2 (I was previously working this project with no source control). The StarTeam 2009 R2 integration client for VS2012 has been installed for multiple weeks, but since putting the solution on the source control server, Visual Studio's performance has been seriously reduced (waiting 20-40 seconds for context menu to popup) and now this error which makes no sense to me.
SQL71518: The identity column '[Domain\Login].[temp#].[Id]' must be of data type int,
bigint, smallint, tinyint, decimal, or numeric with a scale of 0, and the column must
not be nullable.
As far as I can tell, there is nothing syntactically wrong with this code - though I may agree with lots of other issues...
CREATE TABLE [Domain\Login].[temp#]
(
[Code] VARCHAR (20) NOT NULL,
[Description] VARCHAR (255) NOT NULL,
[Id] INT IDENTITY(1, 1) NOT NULL
)
Any idea why the [Id]
column is flagged with Error SQL71518? The column is of datatype int
and is non-nullable, which meets the requirements mentioned in the error message.
This code was inherited from an outside vendor, who stopped supporting their product. Since the product was considered important to my company, they arranged to get the source code so we could support it ourselves. I'm relatively new to this particular project and the whole team knows that it has serious flaws; but we've not received the budget necessary to upgrade the code and fix all the design issues - only to perform some "minor" modifications, which should be unrelated to the above error. As such I'd ignore this error, but it is interfering with the VS2012 Database Schema Comparison utility.
Edit 1
SSDT for VS 2012 is already at 11.1.50730.0
SQL Server Data Tools 11.1.50730.0
Microsoft SQL Server Data Tools
The table had a single record, so I modified the table design via SQL Server Management Studio (SSMS) to make the identity column the first column in the list. Using SSMS, the table's data was retained during the modification. I'm not sure if Visual Studio would have preserved the table - especially since the Schema Comparison utility was out of commission due to the error.
CREATE TABLE [Domain\Login].[temp#] (
[commodity_id] INT IDENTITY (1, 1) NOT NULL,
[code] VARCHAR (20) NOT NULL,
[name] VARCHAR (255) NOT NULL
);
Whatever is going on with Visual Studio 2012 and SSDT, this seems to have corrected the error -- at least for now.