Save Incomplete Dialog Box
Appears when errors are encountered while trying to save a database diagram or selected tables. This dialog box lists the following: the objects that were successfully saved in the database, the objects that were not saved, and the errors that were encountered.
OK
Returns to the diagram.
Save Text File
Displays the Save As dialog box, prompting you for a location in which to save a text file listing the tables. This file provides a record of the database changes that were successfully saved as well as the changes that could not be saved due to errors.
For more information about the errors that can occur, see:
- Error modifying column properties.
- Invalid cursor state
- Unable to add constraint.
- Unable to create index.
- Unable to create relationship.
- Unable to modify table.
- Unable to preserve trigger.
If the error you want to troubleshoot does not appear in this list, see System errors. for additional messages returned by Microsoft® SQL Server™.
Error modifying column properties
Appears when your constraint expression contains an error.
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]The name '[column value]' is illegal in this context. Only constants, constant expressions, or variables allowed here. Column names are illegal.
Cause
A
Recommended solution
Enclose the value in single quotation marks in the database column's Default Value cell and then save the table.
Invalid cursor state
Appears when Microsoft® SQL Server™ runs out of resources while attempting to save selected
ODBC error text
[Microsoft][ODBC SQL Server Driver]Invalid cursor state.
Cause
There is insufficient space in your database or
Recommended solution
Check to see if the database or the transaction log is full. If so, increase the size of the database to accommodate the change. Check other system resources or contact your System Administrator.
For more information about increasing the size of your database, see Expanding a Database.
Unable to add constraint
Appears when a new
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Data exists in table '[table name]', database '[database name]', that violates CHECK constraint '[constraint name]' being added. ALTER command has been aborted.
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.
Cause
Existing data does not match the
Recommended solution
Change the data (for example, by using Query Designer) to match the constraint. For details, see Query Designer.
-or-
Clear the Check existing data on creation check box in the Tables property page for the check constraint in question. For more information about disabling this property, see Checking Existing Data when Creating a Relationship.
-or-
Change the constraint expression in the Tables property page for the check constraint in question.
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column '[column name]' specified in constraint definition.
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.
Cause
The text value in the check constraint expression on the Tables property page is not enclosed in single quotation marks (').
-or-
A column that participates in the check constraint has been renamed. For example, if the original constraint had the expression (cityname = 'Paris'
) and you renamed the column to city
, you would see this error.
Recommended solution
Correct the expression and save the table.
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Line [line number]: Incorrect syntax near '[operator]'.
Cause
The expression defined for the check constraint (in the Tables property page) or the 'city equals Paris'
was typed instead of 'city = Paris'
.
Recommended solution
Correct the expression and save the table.
For more information about constraints, see Constraints.
Unable to create index
Appears when a new
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Create unique index aborted on duplicate key. Primary key is '[primary key data]'
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.
Cause
A unique index was created in the Indexes/Keys property page but duplicate data exists in the database.
Recommended solution
Remove duplicate data from the database. For more information, see Designing Queries.
-or-
Change the option in the Indexes/Keys property page to allow duplicate rows in the index.
For more information about creating unique indexes, see Creating a Unique Index.
Unable to create relationship
Appears when a new referential integrity constraint has failed on existing data.
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Data exists in table '[table name]', database '[database name]', that violates FOREIGN KEY constraint '[constraint name]' being added. ALTER command has been aborted.
[Microsoft][ODBC SQL Server Driver][SQL Server]Unable to create constraint. See previous errors.
Cause
Existing data fails the
Recommended solution
Change the data that fails the foreign key constraint by running a query to show all the foreign key values that do not match job_id
column of the employee
table that do not match primary key values in the jobs
table, run a query with this SQL syntax:
SELECT employee.emp_id, employee.job_id
FROM employee LEFT OUTER JOIN jobs ON employee.job_id = jobs.job_id
WHERE (jobs.job_id IS NULL)
For more information, see Creating Queries.
-or-
Clear the Check existing data on creation check box in the Relationships property page. For more information, see Checking Existing Data when Creating a Relationship.
Unable to modify table
Appears when a new
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]The column [column name] in table Tmp_ [table name] may not be null.
Cause
A new database
Recommended solution
Change the column properties. Either select the Allow Nulls
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Attempt to insert the value NULL into column '[column name]', table '[database name] TMP_ [table name]'; column does not allow nulls. INSERT fails.
[Microsoft][ODBC SQL Server Driver][SQL Server]Command has been aborted.
Cause
The Allow Nulls property on an existing database column has been cleared, but the column has existing null values in it.
Recommended solution
Go to the column and select the Allow Nulls property.
For more information about setting properties for database columns, see Column Properties.
Unable to preserve trigger
Appears when your
ODBC error text
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name '[column name]'.
- Unable to preserve trigger '[trigger name]'.
Cause
A change to the table required the table to be recreated. When a table is recreated, the triggers attached to that table are automatically recreated as well.
Recommended solution
The recommended solution depends on the type of change made to the column referenced by the trigger.
To preserve a trigger that references a renamed column
- Rename the column to its original name and then save the table. This action will allow the table to be recreated. You can now rename the column, save the table again, and then edit the trigger to fix the renamed columns.
To preserve a trigger that references a deleted column
- Expand the table that the trigger is attached to.
- Right-click the trigger you want to change and choose Open from the shortcut menu.
- Edit the trigger text and save the trigger.
- Save the table or database diagram.
For more information about triggers, see Triggers and Enforcing Business Rules with Triggers.
System errors
System errors can appear in the Save Incomplete dialog box when you exceed Microsoft® SQL Server™ limitations that are not controlled by the Database Designer. One such error is described here.
ODBC error text
[Microsoft][ODBC SQL Server Driver]Timeout expired.
Cause
The timeout can occur when you are updating the database with any Transact-SQL changes.
Recommended solution
Try again later to save the diagram or selected tables.
-or-
Save a
-or-
Increase the SQL Query Time-out value and try to save the diagram or selected tables again.
See Also
Database Designer Dialog Boxes | Database Designer Considerations for SQL Server Databases