这样不爽呀。
比如:
q.SQL = " Insert into NULLID.ORDERDETAIL "
+ " (CHRNO,CHRBACKNO,CHRCUSTOMER,CHRCUSTOMERPO,CHRIMPORTCOUNTRY,"
+ " CHRIMPORTOFFICE,CHRIMPORTORDER,CHREXPORTCOUNTRY,CHREXPORTOFFICE,"
+ " CHRSUPPLIER,INTQTY)"
+ " values ("
+ "'"+_chrno+"',"
+ "'"+BackNO+"',"
+ "'"+_Customer+"',"
+ "'"+_CustomerPONO+"',"
+ "'"+ImportCountry+"',"
+ "'"+ImportOffice+"',"
+ "'"+OrderNO+"',"
+ "'"+_ExportCountry+"',"
+ "'"+_ExportOfficeID+"',"
+ "'"+_Supplier+"',"
+ Qty+")";
q.safeExecSql();
q.close();
这是我现在的代码。
我不喜欢sqlStatement里面的传参数的方法,就是setParameter()。
要是可以有q.SQL = ("select * from xxx where CHRNO=%s,CHRBACKNO=%s",chrNO,chrBackNO)多好啊。