BUG: Executing "SP_PrimaryKey" Results in No Primary Key

ID: Q188719


The information in this article applies to:


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 this to be 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.

Additional query words:


Keywords          : kbVisDBTools kbVisID600bug kbGrpASP kbDtQDesigner 
Version           : WINDOWS:1.0,6.0
Platform          : WINDOWS 
Issue type        : kbbug 

Last Reviewed: May 13, 1999