这个查询
SELECT *
FROM tblContracts
LEFT JOIN tblPartys ON tblContracts.id = tblPartys.Contract_id
INNER JOIN tblAdministrators
ON tblContracts.AdministratorID = tblAdministrators.ID
适用于 mysql 数据库,但不适用于 Access DB !!!
我收到这个错误打击:
System.Data.OleDb.OleDbException:查询表达式“tblContracts.id = tblPartys.Contract_id INNER JOIN tblAdministrators ON tblContracts.AdministratorID = tblAdministrators.I”中的语法错误(缺少运算符)。在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr) 在 System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult) 在 System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult) 在 System.Data。 System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior 行为,String 方法)处 System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior 行为)处的 OleDb.OleDbCommand.ExecuteCommand(CommandBehavior 行为,Object& executeResult)