Welcome! Log In Create A New Profile

Advanced

SQLServer Native analysis import question

Posted by Jeff Graham 
SQLServer Native analysis import question
July 29, 2021 03:18AM
Here is a question for you SQL gurus,

I am importing new SQLServer file definitions from an SQLServer2019 database using the Native SQL Server Connector for WINDEV and it wants to create FKEYs but gets errors like the following:

Unable to create the "FKEY0134" relation (Source column: "dbo.WORK_ORDER.TYPE,BASE_ID,LOT_ID,SPLIT_ID,SUB_ID", Linked column: "dbo.WORKORDER_BINARY.WORKORDER_TYPE,WORKORDER_BASE_ID,WORKORDER_LOT_ID,WORKORDER_SPLIT_ID,WORKORDER_SUB_ID") in the analysis.
The "dbo.WORK_ORDER.TYPE,BASE_ID,LOT_ID,SPLIT_ID,SUB_ID" item does not exist in the analysis.
The "dbo.WORKORDER_BINARY.WORKORDER_TYPE,WORKORDER_BASE_ID,WORKORDER_LOT_ID,WORKORDER_SPLIT_ID,WORKORDER_SUB_ID" item does not exist in the analysis.

There is an FKEY0134 in one of the SQL database keys (FKEY0093) but it will not create the key. I suspect it has to do with the fact that the Type, BASE_ID, LOT_ID, SPPLIT_ID, SUB_ID are all primary keys. See screen captures in attached file.

Any suggestions would be appreciated.

Jeff Graham
Cascade Consulting
Attachments:
open | download - FKEY import issue.pdf (89 KB)
pao
Re: SQLServer Native analysis import question
July 29, 2021 09:54AM
Did you try doing it in two steps, first import the tables and only after that the FK.

Regards

Paulo Oliveira
Re: SQLServer Native analysis import question
July 29, 2021 06:09PM
Yes, I tried that and it does not try to create the keys.
Re: SQLServer Native analysis import question
July 29, 2021 07:46PM
The more I experiment, I see that the problem seems to be that the composite keys in the two files being linked are slightly different. So I tried to create a link in the analysis that created the matching composite key in the SQL data. Of course I can't do that in the live data as it is controlled bye the vendor, Infor (new owner of Visual Manufacturing) but will see what happens.
Re: SQLServer Native analysis import question
December 04, 2021 10:24PM
FYI PC Soft technical support has accepted by issue as valide and assigned a case number. When it will be fixed is unknown but they say they will inform me.

Jeff Graham
Cascade Consulting
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: