Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


anjuvijayan
error!!!!!!!!!
1 Answer(s)      3 years and 11 months ago
Posted in : Java Beginners


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...


Advertisement
View Answers

January 25, 2011 at 4:58 PM


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



Related Tutorials/Questions & Answers:
Advertisements
 

 

 

DMCA.com