Hi,
I am using Statement and it's addBatch() and executeBatch(); Database is Ms Access. I am using addBatch() twice before executing it.
The sql queries are:
st.addBatch("Insert into table1 (ProjID,developer) values ('"+prjid+"','"+dev+"')");
st.addBatch("Insert into table2 (ProjID,dated) values ('"+prjid+"',#"+date+"#)");
where prjid and dev are
string variables and date is sql date.
The tables has a relationship table1 -one-----many- table2 between ProjIDs.
Now the problem is that while the executing is giving no problem and the int [] array returned has 1,1 values ie it is effecting both tables records
but though the data is saved in the table1 and not in the table2....why?
point: using :
st.executeUpdate("("Insert into table1 (ProjID,developer) values ('"+prjid+"','"+dev+"')");
st.executeUpdate("("Insert into table1 (ProjID,dated) values ('"+prjid+"','"+date+"')");
I am getting results!
Please help?
Maki Jav