我使用ole db如下:
_adapter = new OleDbDataAdapter(command);
_adapter.Fill(Set);
command.commandtext填充为:
"SELECT [Roster$].[ID],[Roster$].[Name],[Roster$].[Level],[Events$].[Name],[Scores$].[Score]
FROM [Roster$]
Inner Join [Scores$] on [Scores$].[CompetitorId] = [Roster$].[ID]
Inner Join [Events$] on [Events$].[ID] = [Scores$].[EventId]
where [Roster$].[ID] = 1"
我得到的错误是:
Syntax error (missing operator) in query expression '[Scores$].[CompetitorId] = [Roster$].[ID] Inner Join [Events$] on [Events$].[ID] = [Scores$].[EventId]'.
不确定我哪里出错了。
修改 我试图连接到Excel数据库BTW