Relationship Creation Error


Author
Message
StrataFrame Team
S
StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
The update posted yesterday will allow you to create relationships between tables in different schemas now Smile
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yes.  But future updates will not have this issue.
Ozzie Seda, Jr
Ozzie Seda, Jr
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
So if I don't have my tables in different schemas within the database, it should create the relationship?

Ozzie

StrataFrame Team
S
StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)StrataFrame Developer (4.1K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
There was an error within the DBEngine assembly during the foreign key creation where certain schema names were not references properly during the foreign key creation.  We fixed it, and I will let you know when a new update is available containing the fix.
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Ozzie,

I will look at this some more.  I am having a hard time making this work in SQL Server (aside from the DDT).  There is a SQL Server rule that is being violated and I am going to have to take a closer look.  It will more than likely be Monday before I get back to you on this.

Ozzie Seda, Jr
Ozzie Seda, Jr
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Attached is the pkg file.  I tried what you suggested on your last post, didn't work.

Ozzie

Attachments
bbadmin.pkg (134 views, 17.00 KB)
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Try the last post I made and see if it will succesfully create the relationship.  If not, create your package file and post it as an attachment here and I will fix it and send it back to you so you can see how to create the relationship.
Trent Taylor
Trent Taylor
StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)StrataFrame Developer (9.8K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Then this is what you will do.  Make sure that all of your foreign keys are removed from the Trade and TradeDivision tables (just to start over).  Once this is done do the following:

  1. Select the TradeDivision table
  2. Open the Relationships Item underneath the TradeDivision table
  3. Create a new relationship
  4. Name the item something like Fk_TradeDivision_Trade
  5. Select the TradeDivisionID field for the parent
  6. Select the Trade table from the bottom combo
  7. Select the TradeDivisionID field on the bottom right combo
  8. If you already have data in the table that will break the relationship, you can turn off the Ensure data checkbox (top check)
  9. Set any cascade details
  10. Click OK
  11. Rebuild your package and redeploy

Ozzie Seda, Jr
Ozzie Seda, Jr
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Creating relationship 'FK_Trade_TradeDivision' failed.
Create failed for ForeignKey 'FK_Trade_TradeDivision'.
An exception occurred while executing a Transact-SQL statement or batch.
Foreign key 'FK_Trade_TradeDivision' references invalid table 'Trade'.
Could not create constraint. See previous errors.

This is the message when I create the relationship on table 'Trade'.

When I create the relationship on table 'TradeDivision' I get the same message as above except it references invalid table 'TradeDivision'

Thanks

Ozzie

Ozzie Seda, Jr
Ozzie Seda, Jr
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Also, I tried defining the relationship on each table individually, after deleting all tables and every thing on SQL Express, and still the same result.

Ozzie

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search