MySQL Forums
Forum List  »  Newbie

Re: please check code... simple SQL
Posted by: Peter Brawley
Date: March 10, 2012 08:30PM

> i am trying to use rs.updateString()

Entirely inappropriate; IIRC updatestring() in connector/JDBC updates one column with one value. You are issuing multiple DDL commands. You need to code a loop where you submit one command at a time, poll for all possible errors, and handle them when they occur.

>DELETE FROM Student;
>DELETE FROM Staff;
>DELETE FROM ModuleT;
>DELETE FROM Registered;
>DELETE FROM Teaches;

?! Entirely superfluous on tables which have just been created!

RJ> You did not specify ENGINE=InnoDB, which you should do if you are using FOREIGN KEYs.

If the default engine is InnoDB, that's not needed.

Options: ReplyQuote


Subject
Written By
Posted
Re: please check code... simple SQL
March 10, 2012 08:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.