日期:2014-05-20  浏览次数:20583 次

数据库
String upd="insert into [info](GID,GName,YW,GAddress,Tele_Number,Email,GType"
  + "EName,EType,EAddress,BID,BName,Bnss)values('"+GID+"' and '"+GName+"' and '"+YW+"' and '"+GAddress+"' and '"+Tele_Number+"'"
  + " and '"+Email+"' and '"+GType+"' and'"+EName+"' and '"+EType+"' and '"+EAddress+"' and '"+BID+"' and '"+BName+"' and '"+Bnss+"')";
请问高手,帮我看看是什么错误,我看了很久,也改了,可是改不对。
编译提示:关键字 'and' 附近有语法错误。

------解决方案--------------------
String upd="insert into [info](GID,GName,YW,GAddress,Tele_Number,Email,GType" + ","
+ "EName,EType,EAddress,BID,BName,Bnss)空格 values('"+GID+"' and, '"+GName+ ......;
------解决方案--------------------
添加sql也可以这样写!!!!
insert into 表名 values('','','','','','','');
------解决方案--------------------
数据库插入字段之中不是用and 是用 ,