0
我有两个疑问这将插入一个报价的名称和需要处理其内部有
insertSQL = "insert into LineManager(LINEMANAGERID,LINEMANAGERNAME,BUSINESSGROUPID,STATUS) VALUES('" + lineManager.getLineManagerID() + "','" + lineManager.getLineManagerName() + "','" + lineManager.getBusinessGroupID() + "','" + lineManager.getStatus() + "')";
updateSQL = "update LineManager set BUSINESSGROUPID ='" + lineManager.getBusinessGroupID() + "' , LINEMANAGERNAME ='" + lineManager.getLineManagerName() + "' , STATUS ='" + lineManager.getStatus() + "' where LINEMANAGERID='" + lineManager.getLineManagerID() + "'";
到目前为止,这是工作的罚款为正规名称更新DB-,但是当面临问题LineManager名字就像''多克尼达先生',多米尼克先生'。它在执行期间抛出异常。
任何人都可以帮助解决这个问题吗?
使用的参数。不要使用参数来查询字符串。 –