This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Is there a built-in method to decompose a multi-field composite key Id into an array that looks like: Lightspeed Id consisting of {fld1 string, fld2 string, fld3 int32} which is approximately a structure like: fld1PropertyName: xxxx fld3PropertyType: string fld2PropertyName: xxxx fld2PropertyType: string fld3PropertyName: xxxx fld3PropertyType: int32 So I need to assign the LS Id to the PrimaryKey property of a System.Data.DataTable where it expects 1:N field names to be added to a DataColumnCollection. It probably would be better not to ask why I am in this rabbit-hole but suffice it to say that I am trying to shoehorn some use of Lightspeed into existing code that relies on old-school DataAdapters and Fill and ADO and so on . I need to represent the LS Entity So if there is some code to do this decomposition or creating a DataTable from an Entity generically, that would be helpful. |
|
|
Hi, You should be able access the fields using a type for the composite key that provides the constituent field properties: http://www.mindscapehq.com/documentation/lightspeed/Working-with-Legacy-Databases/Using-Composite-Keys Unfortunately, if you're looking for DataTables, you'd want to go directly through ADO.NET. There's not much in LightSpeed that concerns itself with DataTables. I hope the details about the composite keys helps, John-Daniel Trask |
|