[Microsoft][ODBC Microsoft Access 驱动程序] FROM 子句语法错误.错误是出在哪,急!
rs=stat.executeQuery("SELECTodDateFROMorderWHEREodDate='"+sTime+"'");rs=stat.executeQ...
rs=stat.executeQuery("SELECT odDate FROM order WHERE odDate='"+sTime+"' ");
rs=stat.executeQuery("SELECT [odName] FROM order WHERE [odName]='"+name+"' AND [odPeople]='"+ people +"' AND [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'");
rs=stat.executeQuery("SELECT order.odName,order.odPeople,order.odDeskNum,order.odDate FROM [order] WHERE odDate='"+sTime+"'");
String sql= "delete * from order WHERE [odName]='"+name+"' AND [odPeople]='"+people+"' AND [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'";
int j=stat.executeUpdate(sql);
String sql= "delete * from order WHERE [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'";
int j=stat.executeUpdate(sql);
rs=stat.executeQuery("SELECT * FROM order WHERE [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'");
上面是所有的sql语句,ACCESS数据库book里面有张order表,字段有odName,odPeople,odDesknum,odDate
全部是文本的类型.报错是在sql语句,我看了半天还是没看出错误啊!!求助!!
= =我找到了一个错误,我要把所有 order 改成 [order]
然后继续提示还有错误:NSERT INTO 语句的语法错误 展开
rs=stat.executeQuery("SELECT [odName] FROM order WHERE [odName]='"+name+"' AND [odPeople]='"+ people +"' AND [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'");
rs=stat.executeQuery("SELECT order.odName,order.odPeople,order.odDeskNum,order.odDate FROM [order] WHERE odDate='"+sTime+"'");
String sql= "delete * from order WHERE [odName]='"+name+"' AND [odPeople]='"+people+"' AND [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'";
int j=stat.executeUpdate(sql);
String sql= "delete * from order WHERE [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'";
int j=stat.executeUpdate(sql);
rs=stat.executeQuery("SELECT * FROM order WHERE [odDeskNum]='"+num+"' AND [odDate]='"+sTime+"'");
上面是所有的sql语句,ACCESS数据库book里面有张order表,字段有odName,odPeople,odDesknum,odDate
全部是文本的类型.报错是在sql语句,我看了半天还是没看出错误啊!!求助!!
= =我找到了一个错误,我要把所有 order 改成 [order]
然后继续提示还有错误:NSERT INTO 语句的语法错误 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询