BUG: Executing "SP_PrimaryKey" Results in No Primary Key (188719)



The information in this article applies to:

  • Microsoft Visual Database Tools
  • Microsoft Visual InterDev 6.0

This article was previously published under Q188719

SYMPTOMS

No primary key is indicated on a Table object via Query Designer or schema when SP_PrimaryKey is executed.

CAUSE

SP_PrimaryKey was obsolete beginning in Visual InterDev 6.0, but the stored procedure was retained for compatibility reasons.

RESOLUTION

Primary keys created with this stored procedure are not enforced by the engine. The INSERT command would have accepted duplicate values for the primary keys column. All of the SQL-DMO and ODBC calls/procedures that report reading meta-data do not report these primary keys as well.

STATUS

Microsoft has confirmed that this is a bug in Microsoft Visual Database Tools version 1.0 and Microsoft Visual InterDev version 6.0.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Via the SQL pane, create a primary key:
    execute sp_primarykey newtable col1
    						
  2. Switch to graphics mode to view the newly created table.
No primary key is indicated on Table object via the Query Designer or Database Designer.

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbBug kbDatabase KB188719