du skal bruge parentes i sub query. prøv dette:
query = "INSERT INTO empallowance(emp_id_fk,allowance_id_fk) VALUES((SELECT emp_id FROM employee WHERE emp_cnic='" + cnic + "'),@allowance_id_fk)";
du skal bruge parentes i sub query. prøv dette:
query = "INSERT INTO empallowance(emp_id_fk,allowance_id_fk) VALUES((SELECT emp_id FROM employee WHERE emp_cnic='" + cnic + "'),@allowance_id_fk)";