mark_h
11th September 2002, 20:19
We are getting the following message from several sessions:
Degree mismatch in reference predicate ('tdinv001')
Attaching an image I hope you can read. Does anybody have any clues?
Mark
lbencic
11th September 2002, 20:59
Mark -
I think this is part of the problem:
where {:ticst001.cwar,:ticst001.sitm,""} refers to tdinv001
See how they are writing the references? It seems to compile & run fine on my system now, but I remember just recently that some code we wrote that way and was working fine all of a sudden would not and I had to change it to get it to compile again.
Can you make sure you have the latest tools solutions? I think at SOME point this type of reference got hosed in the tools / database driver, but is now ok.
What other sessions / tables? I can check the code & see if this type of reference is used there as well.
You can write a test code with this structure for the reference and see if it is bombing on your system.
Check with Baan support.
lbencic
11th September 2002, 21:08
Also, make sure the following patch is in your code:
|* DF 70359-1, Marinus van der Veen, 1998-09-03
|* 2 fields refers to 3 fields is wrong and gives problems in level2 db driver
|*
#ident "@(#)DF70359-1, Marinus van der Veen, 1998-09-03, B40_c5"
That patch changed the reads to tdinv001
mark_h
11th September 2002, 22:12
We are in the process of re-building this company along with company 000. You can check my post in the tools and admin forum. Our app. admin had problems recreating our test(555) and dev(701) companies. He was suppose to load the latest tools patches in both places. The session in question is the same in dev and production(same VRC and same object), but it bombs in the dev company. I will have him report this to Baan and let him know about the solution you posted.
Thanks for the response.
Mark
OmeLuuk
12th September 2002, 15:44
In the past (sits in the portingset) is was allowed to have references like this in your Baan programs:
one sales order
---multiple order lines
read order header
as set with 1 rows
where orderheader number refers to orderline number
to see what order header is without order line.
since it is a 1 to n reference, there could be more than one match.
This is no longer allowed (due to stricter following the SQL standard): the construct refers to is now only allowed in case you use 1 to 1 reference. So in case there is a reference, all index fields must be given/match.
This has been described in the solution that comes with the portingset 6.1c.06 +:
156806 New portingset requires change in certain queries.
tdB40c4 various 12 Dec 2001
126089 Error "Degree mismatch in reference predicate" when compiling scripts when using portingset 6.1c.05.02 or higher
port6.1c.05.02 several
I think your developers should go through their code and search for "refers to". This can be done from the second form in ttadv2130m000 "Search for pattern". Restrict to the own VRC's multiple scripts. Be sure that you apply the "refers to" only in 1 to 1 situations.
lbencic
12th September 2002, 16:57
Thanks OmeLuuk - that certainly explains some things.
That is what happened with the standard script tisfc0408. The refers to tdinv001 used to have 2 fields of the 3 field index. The solution DF70359-1 changed it to have all 3 fields of the index, satisfying the new condition as you posted.
mark_h
12th September 2002, 19:20
Thanks Omeluuk and Lisa. That is what it turned out to be. Our admin installed a new porting set on the server, but then only installed the follow on patches to the test company. He installed the follow on patches into the development company today and things are working - at least for now.
Mark