I am try to run the code below but every time I run it, it don\'t work. Could any one please highlight what i am doing wrong?
What the code should do is:
I have
First of all give your tables proper names. "r" and "sa" don't mean anything.
I don't know what the problem with your SQL is but I will suggest that you use a PreparedStatement. It makes it easier to code the SQL so you don't worry about delimiter type mistakes.
A basic example would be:
String sql = "INSERT INTO Page (Name, Title) VALUES (?, ?)";
PreparedStatement stmt = connection.prepareStatement(sql);
stmt.setString( 1, "Name1" );
stmt.setString( 2, "Title1" );
stmt.executeUpdate();
You can search the forum or web for more information.