FIX: SQL Upsizing Wizard - UW Fails to Create PK Indexes if Fields in Different Tables have Duplicate NamesID: Q221659
|
After upsizing a database that had primary key indexes in two tables with the same field and or tag name, the following error occurs:
The second Primary Key index "F1" could not be created.Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'f1' in the database.
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.
This bug has been fixed in Visual Studio 6.0 Service Pack 3.
#DEFINE DBCNAME 'testdb'
#DEFINE TABNAME 'testtab'
#DEFINE TABCOUNT 2
CLEAR
CLOSE DATABASES ALL
DELETE FILE testdb.DBC
DELETE FILE testdb.dc?
CREATE DATABASE DBCNAME
FOR lni = 1 TO TABCOUNT
DELETE FILE (TABNAME+ALLTRIM(STR(lni)))+'.dbf'
DELETE FILE (TABNAME+ALLTRIM(STR(lni)))+'.cdx'
CREATE TABLE (TABNAME+ALLTRIM(STR(lni))) (F1 C(10) NOT NULL ;
PRIMARY KEY, F2 C(10) NOT NULL)
ENDFOR
ALTER TABLE (TABNAME+ALLTRIM(STR(lni-2))) ADD FOREIGN KEY TAG ;
F1 REFERENCES (TABNAME+ALLTRIM(STR(lni-1))) TAG F1
Additional query words: KBDSE
Keywords : kbwizard kbDatabase kbVFp600 kbVFp600bug KbDBFDBC kbVS600sp3fix kbGrpFox kbDSupport
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: July 1, 1999