Hello chaps.
Ok; just built a query in Access 2000:
Code:
SELECT
[tblRooms].[id],
[tblRooms].[roomName],
[tblDirectionConstraints].[userLevel],
[tblDirectionConstraintObjects].[objectID]
FROM ((([tblRoomDirections]
INNER JOIN [tblRooms] ON [tblRoomDirections].[targetRoomID] = [tblRooms].[id])
LEFT JOIN [tblDirectionConstraints] ON [tblDirectionConstraints].[roomID]=[tblRoomDirections].[roomID] AND [tblDirectionConstraints].[directionID]=[tblRoomDirections].[directionID])
LEFT JOIN [tblDirectionConstraintObjects] ON [tblDirectionConstraintObjects].[directionConstraintID] = [tblDirectionConstraints].[id])
WHERE [tblRoomDirections].[roomID] = 4 AND [tblRoomDirections].[directionID] = 1;
The above code is pasted faithfully from a "response.write(strSQL)" debug call. If I paste it into Access query builder thingy and run it, I get results. If I run the SQL query from ASP, I get an error, "Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another", on the line that opens the recordset.
I can think of a few possible causes:
1. JOIN types - does Access not like LEFT JOIN or something?
2. AND in a JOIN...ON statement - can I do that? Join tables on TWO shared fields?
3. Something else I've overlooked? Syntax screwed? Typo?
heeelp
