Hi all,
I have two tables and their format is as follows:
SiteInformation
-----------------
SiteID - PK
DatabaseInformation
-----------------------
SiteID - FK
UniqueDatabaseID - PK (this is concatenated on the form using SiteID+Databasename)
DatabaseName
This works well and allowed me to have a one to many relationship (essentially allowing multiple DBs of different names per site). The issue that I am facing is that when my SiteID is changed in SiteInformation it is pushed down through Cascade Update, however my UniqueDatabaseID is still formatted with the old value of SiteID - it doesn't get updated as there isn't a relationship here.
Aside from creating SQL commands to update this if the SiteID is changed in SiteInformation is there any other way to go about this? For example this would be perfect - creating a cascade update relationship for DatabaseInformation.UniqueDatabaseID from DatabaseInformation.SiteID and then concatenating it with DatabaseInformation.DatabaseName.
I have two tables and their format is as follows:
SiteInformation
-----------------
SiteID - PK
DatabaseInformation
-----------------------
SiteID - FK
UniqueDatabaseID - PK (this is concatenated on the form using SiteID+Databasename)
DatabaseName
This works well and allowed me to have a one to many relationship (essentially allowing multiple DBs of different names per site). The issue that I am facing is that when my SiteID is changed in SiteInformation it is pushed down through Cascade Update, however my UniqueDatabaseID is still formatted with the old value of SiteID - it doesn't get updated as there isn't a relationship here.
Aside from creating SQL commands to update this if the SiteID is changed in SiteInformation is there any other way to go about this? For example this would be perfect - creating a cascade update relationship for DatabaseInformation.UniqueDatabaseID from DatabaseInformation.SiteID and then concatenating it with DatabaseInformation.DatabaseName.