views:

30

answers:

1

When I try to run Generate Create Script to Project on a table in the Server Explorer, I get the following error—An error occurred during the operation: The Table '[dbo].[TableName]' cannot be scripted as its data is not accessible.

I can view the table data without any problem. I have generated several create scripts from the same database. What could be the problem?

+1  A: 

I figured it out. The source sql server is a 2005 server that we are using in development. The target sql server is still running 2000. The create script generated by the 2005 server where the primary key constraint code is part of the CREATE TABLE statement, rather than an ALTER TABLE statement issued after the table has been created.

pamela

pthalacker