Hi

After connecting to some DB2 tables, I noticed that Studio is not recognizing the Primary-Key definitions properly.

One Example:
This is how the table is defined in DB2.
Click image for larger version. 

Name:	Primary-Key_1.PNG 
Views:	95 
Size:	21.5 KB 
ID:	10658

But After "connecting to" this table from Studio, I can't see the "key" icon in the 1st column.
Click image for larger version. 

Name:	Primary_PK_Studio_Table.PNG 
Views:	132 
Size:	76.1 KB 
ID:	10659

Despite the "Primary Index" table property (PRIMARY_INDEX int keyword) has been set properly to 1. The "key" icon does not appear in front of the columns in the grid.

And, looking at the Index-1 definition, "sql primary key' is marked as False, but it should be True I guess
Click image for larger version. 

Name:	Primary_PK_Studio_Index.PNG 
Views:	94 
Size:	10.4 KB 
ID:	10660

If I try to change this index attribute to True, when I try to save the table, I thought it would only make some changed in the .int file as the index already exist in the back-end. but actually DF tries to make some backend modification and fails with SQL0669N error bellow:

Studio Error
Table changes for (USERGROUP) were not saved.
Generic error 42917 (-699) -- [IBM][CLI Driver][DB2/NT64] SQL0669N A system required index cannot be dropped explicitly. SQLSTATE=42917
Table = USERGROUP (5), Source = DB2_DRV.Structure_End.DropIndexes
It looks DF/Studio/CK tried to drop the index, but it couldn't as the index is used as PK.

Regards




Regards