I’m creating some events in a base object (class) in PowerBuilder, and the descendent’s of this base datawindow need to know what the primary key of that table (or row) is. How would you determine the primary key in code?
I’m creating some events in a base object (class) in PowerBuilder, and the descendent’s
Share
You can iterate through the Column list of the datawindow and check the Key property using describe or dot notation:
This lets you know whether the column is included in the highlighted list you see in the datawindow painter under the menu item Rows->Update Properties->Unique Key Columns(s):
Here are the docs on that property:
http://infocenter.sybase.com/help/topic/com.sybase.dc37783_1150/html/dwref/CAIBHFGF.htm