SQL question
Steve Albin
steve at steve-albin.com
Wed Apr 4 16:51:29 CDT 2007
I have the following SQL:
SELECT Sessions.dSessDate, types.cTypeName, Sessions.cCity, Sessions.nSessId
FROM Sessions, Labels, Types
WHERE Sessions.nLabelId = 5
AND Sessions.SessType = Types.nId
ORDER BY Sessions.dSessDate
This SQL worked fine in V4RB 2.5.4
In V4RB 2.5.8, I get the following error:
Message: The link(s) is not found between "Types" tables.
Err Number: 529684
I don't understand because I'm specifying the link between Session and Types in the WHERE clause. I assume this error is in relation to a bad object pointer link.
I fixed the SQL by adding a link between Sessions and Labels as so:
SELECT Sessions.dSessDate, types.cTypeName, Sessions.cCity, Sessions.nSessId
FROM Sessions, Labels, Types
WHERE Sessions.nLabelId = 5
AND Sessions.SessType = Types.nId
AND Sessions.nLabelId = Labels.nId
ORDER BY Sessions.dSessDate
But, there is an object pointer link between Sessions and Labels. It shows up fine when I use VStudio 2.5.4.
I have had other SQL failures of a similar nature after upgrading to 2.5.8. I don't mind tightening up my SQL code to fix these, but I don't understand why this is not working. Shouldn't Valentina recognize the link? And why does it complain about the TYPES table when that doesn't seem to be the problem?
By the way, I tested this SQL in VStudio as well as my RB app and get the same results. So it is not my app.
Steve
--
Steve Albin - Montclair, NJ
http://www.jazzdiscography.com/
http://www.steve-albin.com/
More information about the Valentina
mailing list