ada.SelectCommand.CommandText = "SELECT top 5 [alarm.zone] as [zone],[alarm.nox] as [nox],[alarm.date] as [date],[alarm.time] as [time],[alarm.distance] as distance,[town.dept] as [dept] FROM [ALARM] left JOIN [town] ON ([ALARM.NOX] = [town.NOX]) AND ([ALARM.ZONE] = [town.ZONE]) order by date desc,time desc "
提示无效的括号名称 '[ALARM.NOX] '。
我要是不用lift join 就可以
------解决方案--------------------------------------------------------
SQL语句的问题
------解决方案--------------------------------------------------------
你把这个
SELECT top 5 [alarm.zone] as [zone],[alarm.nox] as [nox],[alarm.date] as [date],[alarm.time] as [time],[alarm.distance] as distance,[town.dept] as [dept] FROM [ALARM] left JOIN [town] ON ([ALARM.NOX] = [town.NOX]) AND ([ALARM.ZONE] = [town.ZONE]) order by date desc,time desc
放在SQL里去看看 就会知道哪里语法有错了
------解决方案--------------------------------------------------------
你在SQL中运行一下 就会知道了应该
我这样看不出来 因为我没你的数据库