
st=con.createStatement(); int a=Integer.parseInt(txttrno.getText()); String b=txttname.getText(); String c=txtfrom.getText(); String d=txtto.getText(); String e=txtname.getText(); String f=txtgen.getText(); String g=txtadd.getText(); int h=Integer.parseInt(txtphone.getText());
rs=st.executeUpdate("insert into railway values("+a+","'+b+"',"'+c+"',"'+d+"',"'+e+"',"'+f+"',"'+g+","+h+")");
plz someone help me in removing errors in the above line....

Hi Friend,
The problem lies in your query.We have modified it.
Here is the modified code:
rs=st.executeUpdate("insert into railway values("+a+",'"+b+"','"+c+"','"+d+"','"+e+"','"+f+"','"+g+"',"+h+")");
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.