﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » Relating on non primary key</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 13:39:30 GMT</lastBuildDate><ttl>20</ttl><item><title>Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28753.aspx</link><description>I am importing lagacy data. I have imported the data using sqlBulkCopy the old data priamry key is a random number entered by the user so they are all over the place. The new tables auto generate the primary keys. I heed to link te two tables on a field containing the old primary key so that I can update the FK with the new PK. I have been looking at the BusinessLayerLinkManager but am not getting anywhere. Is that the way I should be doing this?</description><pubDate>Thu, 21 Oct 2010 13:31:41 GMT</pubDate><dc:creator>Ian Johnston</dc:creator></item><item><title>RE: Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28792.aspx</link><description>Glad it helped, Ian. :cool:</description><pubDate>Thu, 21 Oct 2010 13:31:41 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28789.aspx</link><description>This is a one time migration operation. Got it working using Ivan's suggestion.</description><pubDate>Thu, 21 Oct 2010 12:55:46 GMT</pubDate><dc:creator>Ian Johnston</dc:creator></item><item><title>RE: Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28788.aspx</link><description>Thanks for the input, got it working&amp;nbsp; using&amp;nbsp; a lookup on th old key and returning the new one.</description><pubDate>Thu, 21 Oct 2010 12:53:51 GMT</pubDate><dc:creator>Ian Johnston</dc:creator></item><item><title>RE: Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28758.aspx</link><description>Ian, is this a data migration task (i.e. you're doing it or writing a script to handle it one time) or is this something the users need to do as part of normal use of the app?</description><pubDate>Wed, 20 Oct 2010 14:48:17 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Relating on non primary key</title><link>http://forum.strataframe.net/FindPost28755.aspx</link><description>Hi Ian. &lt;br/&gt;&lt;br/&gt;If I understand what you need, you have a Parent and a Child imported from a legacy database and want to update the Child foreign key with the new Parent PK, is that so? I guess you have the value of the old Parent "primary key" stored in some field in your table, so you could create a Fill Method on your Child table that woud take the Parent table old "primary key" as a parameter and then write the SQL Server statement to fill your Child BO with that(those) record(s) and then change any field contents you would like.</description><pubDate>Wed, 20 Oct 2010 13:46:30 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item></channel></rss>