> st.execute("insert into user
> values"+newUser+","+newPass);
>
> i am trying to take the values from awt there newuser
> and newPass are the values taken from the textboxes
> of the awt
shouldn't there be a space after values? I would use brackets as well:
st.execute("INSERT INTO USER VALUES("+newUser+" , " + newPass + ")");
Print it using System.out.println to the console and read it. Is is correct? If you're unsure, copypaste it into your DB admin tool, execute it and check the error message.
This has actually nothing to do with JDBC, but with SQL. Here are some SQL tutorials to work on your SQL knowledge: http://www.google.com/search?q=sql+tutorial
Once you get used with SQL, I recommend you to use PreparedStatement for such queries. You will risk SQL injections otherwise.