Ozzie Seda, Jr
|
|
Group: Forum Members
Posts: 7,
Visits: 12
|
I'm trying out the demo of the DDT and when I create a relationship between 2 tables and go to deploy to server I get the following error: Creating relationship 'FK_relationship' failed. Create failed for ForeignKey 'FK_relationship'. An exception occurred while executing a Transact-SQL statement or batch. Foreign key 'FK_relationship' references invalid table 'master table'. Could not create constraint. See previous errors. There are no previous errors. I'm using SQL Server Express. I've tried setting the relationship from both tables as parent child, child parent with the same results. Any ideas? Thanks, Ozzie
|
|
|
Ozzie Seda, Jr
|
|
Group: Forum Members
Posts: 7,
Visits: 12
|
 Here's what I'm trying to accomplish...nothing out of the ordinary. Ozzie
|
|
|
Ozzie Seda, Jr
|
|
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
|
|
|
Ozzie Seda, Jr
|
|
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
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
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.
|
|
|
Ozzie Seda, Jr
|
|
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
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
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.
|
|
|
StrataFrame Team
|
|
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.
|
|
|
Ozzie Seda, Jr
|
|
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
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
Yes. But future updates will not have this issue.
|
|
|
StrataFrame Team
|
|
Group: StrataFrame Developers
Posts: 3K,
Visits: 2.5K
|
The update posted yesterday will allow you to create relationships between tables in different schemas now
|
|
|
Trent Taylor
|
|
Group: StrataFrame Developers
Posts: 6.6K,
Visits: 7K
|
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: - Select the TradeDivision table
- Open the Relationships Item underneath the TradeDivision table
- Create a new relationship
- Name the item something like Fk_TradeDivision_Trade
- Select the TradeDivisionID field for the parent
- Select the Trade table from the bottom combo
- Select the TradeDivisionID field on the bottom right combo
- If you already have data in the table that will break the relationship, you can turn off the Ensure data checkbox (top check)
- Set any cascade details
- Click OK
- Rebuild your package and redeploy
|
|
|