查询表达式中的Oledb语法错误(“缺少运算符”)

时间:2014-12-22 01:33:12

标签: c# sql oledb oledbexception

我使用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

0 个答案:

没有答案