problem in query

i m having problem while deletign and updateing the data in the tables. i m using the MS ACCESS with jsp . in which im doing work on school website project.sir i m trying to delete complete record of a teacher from all the tables related to teacher by giving the teacher id.
i m usign the query ,
stat.executeQuery(DELETE * from teacherpersonalinfo ti,
teacherjob tj where ti.ID=tj.ID AND ID='"+ID+"');
but this is giving me the problem "specify the table name".and i m able to delete the information from one table at a time , not from all.
.........................................................................
2nd problem;
sir i m having the problem in code for updating the teacher information in my project . i have two tables
(1)teacher-personal-info(id,name,address,age,phone,email);
(2)teacher-job(id,subjectid,salary,experience,date-of-joinig);

how can i made update the table is this right code .in this code i m trying to update the selected id from selected table by fetching the olddata from database in the form and then again inserting the data in to database .i m using the access,jsp.
check pls if there is any problem.and also tell me how can i get the result from two tables through while(rs.next()){} and print it
.........code is here........