SQL异常:com.microsoft.sqlserver.jdbc.SQLServerException: 'st'附近的语法不正确。
这是我整个程序代码的数据插入部分。我猜这个异常就在这里
<convert float[] depthmap into cv::Mat and pcl::PointCloud<pcl::PointXYZRGB> pointcloud>
CRForestEstimator->estimate(..., cv::Mat pointcloud, ...)
pcl::RFFaceDetectorTrainer->setInputCloud(PointXYZ version of pointcloud)
pcl::RFFaceDetectorTrainer->detectFaces()
答案 0 :(得分:1)
你错过了查询中的单引号
在"+tdiv+"'
应该是
'"+tdiv+"'
使用以下查询
String SQL;
stmt = con.createStatement();
SQL = "INSERT INTO formtable (clgname,clgaddres,hmob,hemail,pmonth,pyear,sname,gender,dob,paddr,smob,semail,tenboard,tenyop,tenper,tendiv,twscboard,twscyop,twscper,twscdiv,bscbcaboard,bscbcayop,bscbcaper,bscbcadiv,mscboard,mscyop,mscper,mscdiv,frsem,scsem,thsem,frthsem,hardware,os,languages,dbms,communication,stporganization,stpobjective,stphardware,stpsoftware,stpduration,othertraining) VALUES ('"+combo1+"','"+ta1+"','"+text1+"','"+text2+"','"+combo2+"','"+text3+"','"+text4+"','"+rbdtext+"','"+date+"','"+ta2+"','"+text5+"','"+text6+"','"+tboard+"','"+tyop+"','"+tper+"','"+tdiv+"','"+twboard+"','"+twyop+"','"+twper+"','"+twdiv+"','"+bsbcboard+"','"+bsbcyop+"','"+bsbcper+"','"+bsbcdiv+"','"+mscboard+"','"+mscyop+"','"+mscper+"','"+mscdiv+"','"+fsem+"','"+ssem+"','"+tsem+"','"+fosem+"','"+text7+"','"+text8+"','"+text9+"','"+text10+"','"+text11+"','"+text12+"','"+ta3+"','"+text13+"','"+text14+"','"+text15+"','"+ta4+"')";
int rowsEffected = stmt.executeUpdate(SQL);