A aplicação possui duas tabelas. Ao exibi-las e ao salvar o formulário, encontro outro erro:
java.sql.SQLException: ORA-00913: demasiados valores
As tabelas são:
insert into hsemonthly_report1(bgroup,bvertical,pvertical,site,months,years,key1,key2,key3,key4,key5,manhour1,manhour2,mh_total,ip_emp1,ip_emp2,ip_emp3,ip_emp4,ip_con1,ip_con2,ip_con3,ip_con4,ip_cases,ip_injured,ip_totalman,ip_totalcost,ht_topic,ht_train_mth,ht_manhrs_mth,ht_toolbox_mth,ht_hours_mth,ht_inducted_mth,ht_manhrs_ca,ht_toolbox_ca,ht_hours_ca,ht_inducted_ca,lc_govt_mo,lc_penalties_mo,lc_cause_mo,lc_other_mo,lc_govt_co,lc_penalties_co,lc_cause_co,lc_other_co,PK_VALUE,euser,incidence_performance1,incidence_performance2,lti_contractor,lti_total,ip_fy1,mdl_contractor,mdl_total,ip_fy2,fr_1,fr1_emp,fr2con,fr_emp,fr_con,fr,sr1_emp,sr2_con,sr_1,sr_emp,sr_con,sr,capa_closed,comment1 ) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); PreparedStatement pstat=null; pstat=conn.prepareStatement(queryinsert); pstat.setString(1,(ele.getBusiness_group())); pstat.setString(2,(ele.getProjectname())); pstat.setString(3,(ele.getProjectvertical())); pstat.setString(4,(ele.getSite())); pstat.setString(5,(ele.getMonth())); pstat.setString(6,(ele.getYear())); pstat.setString(7,(key.getK1())); pstat.setString(8,(key.getK2())); pstat.setString(9,(key.getK3())); pstat.setString(10,(key.getK4())); pstat.setString(11,(key.getK5())); pstat.setFloat(12,(ele.getManhour1())); pstat.setFloat(13,(ele.getManhour2())); pstat.setFloat(14,(ele.getMH_Total())); pstat.setInt(15,(inc.getEmp_m1())); pstat.setInt(16,(inc.getEmp_m2())); pstat.setInt(17,(inc.getEmp_m3())); pstat.setInt(18,(inc.getEmp_m4())); ...
insert into hsemonthly_report2(bgroup,bvertical,pvertical,site,months,years,ia_inspections_mo,ia_audits_mo,ia_layer1,ia_stake_mo,ia_other_mo,ia_extagencies,ia_obs_closed_mo,ia_obs_open_mo,ia_HSEsteering,ia_inspections_co,ia_audits_co,ia_layer_co,ia_stake_co,ia_other_co,ia_extagencies_co,ia_obs_co,ia_HSEsteering_co,oh_examination,oh_health,oh_other,plan_m,erp_hydrant,eme_year1,eme_year2,env_energy,env_fuels,env_consumed,env_nonhazadous,env_hazardous,env_release,env_spillage,env_programmes,env_other,Con_m,Per_m,Con_y,Per_y) values (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?); PreparedStatement pstat1=null; pstat1=conn.prepareStatement(queryinsert1); pstat1.setString(1,(ele.getBusiness_group())); pstat1.setString(2,(ele.getProjectname())); pstat1.setString(3,(ele.getProjectvertical())); pstat1.setString(4,(ele.getSite())); pstat1.setString(5,(ele.getMonth())); pstat1.setString(6,(ele.getYear()));
pstat1.setInt(7,(ins.getM1())); pstat1.setInt(8,(ins.getM2())); ...
...