I cannot find what is wrong with the following SQL, and yet it generates Error# 3075, stating that there is a "Syntax error (missing operator) in query expression 'F.TableID=T.TableID INNER JOIN XDatabases D ON D.DBID=T.DBID'. I have confirmed that mySQL="SELECT F.FieldName, F.Description, F.Comments, F.IsLocked FROM XFields F INNER JOIN XTables T ON F.TableID=T.TableID INNER JOIN XDatabases D ON D.DBID=T.DBID WHERE F.FieldName='ARRS' AND F.IsLocked=False AND D.DBID=2" and not just the latter "F.TableID=T.TableID INNER JOIN XDatabases D ON D.DBID=T.DBID" portion, so the error message itself is a bit puzzling.
'This is the same SQL, but displayed here to make it easier to read.
SELECT F.FieldName, F.Description, F.Comments, F.IsLocked
FROM XFields F
INNER JOIN XTables T ON F.TableID=T.TableID
INNER JOIN XDatabases D ON D.DBID=T.DBID
WHERE F.FieldName='ARRS'
AND F.IsLocked=False
AND D.DBID=2
I have also tried using the wild card '*' instead of specifying particular fields, and eliminating the WHERE clause, but neither affect it. I have also determined that if I stop with just the first JOIN, it works, but that doesn't produce the needed results. So, it appears that my problem is somehow connected to the second JOIN, but I don't see how. I've tried removing the word 'INNER', and reversing which conditional expression is to the left of the equal sign, and which is to the right, but it still fails. Any ideas what I'm doing wrong here?