String SQL="INSERT INTO tbl_rmadetails (date,rma_no,customer_id,item_id,customer_inv_no,customer_inv_date,customer_inv_amount,serial_no,fault_desc,replaced_serial_no,status,vendor_id,vendor_invoice_no,vendor_inv_date,vendor_rma_ref,remarks) VALUES(str_to_date(da,'%m/%d/%Y'),?,cust,ite,?, str_to_date(date1,'%m/%d/%Y'),?,?,fdesc,?,stat,?,?,?,?,?)";
Hi friends.. i use the above syntax to insert some values into Database from my
JSP page. when i execute this it shows java.sql.NullPointerException.. The problem is three of the field(item_id,customer_id,vendor_id) is foreign key where in my form i enter only 2 of these fields ie) i leave one foreign key field empty. Can i do this? If not then suggest me some other options.. Any help would be appreciated