I haven't tested the rest of the code, but offhand it looks like the problem is this line:
<code><pre> int i=st.executeUpdate("insert into kwality values(arg[0],arg[1])");</pre></code>
The problem is that arg[0] and arg[1] would be understood by your
Java program, but not by the database. By including them as part of the query string, you are telling Java to pass "arg[0],arg[1]" on to the db and try to make sense of it - which doesn't work. What you want is to pass the
values of arg[0] and arg[1]:
<code><pre> int i = st.executeUpdate("insert into kwality values(\""
+ arg[0] + "\", \""
+ arg[1] + "\")");</pre></code>
Note the use of the escape sequence \" to make a " part of the string itself, rather than interpreting the " as the beginning or end of a string. So if arg contains values of "Frodo" and "Sam", this executes the following SQL statement:
<code><pre> insert into kwality values("Frodo", "Sam")</pre></code>
Assuming the table "kwality" has two columns which can take strings, then this should work. If not, you can read the error messages you get and find alternatives. You may also want to give the statement to the DB directly (outside Java) to see what it says. How to do this depends on the DB, but there should be some sort of interactive mode where you can enter queries and commands directly. That way you don't have to keep recompiling and running to see what happens, and often the error messages are clearer this way. (And you know that it's an issue between your query and the database, not a but elsewhere in your Java program.)