String query="insert into Answers (ID,Ques_ID,Answer) select q.ID,q.Ques_ID,'"+txtboxAddAnswer+"' from Questions q where q.Question='"+passingQuestion+"';"; Class.forName("com.microsoft.Sqlserver.jdbc.Sqlserverdriver"); Connection conn=DriverManager.getConnection("jdbc:sqlserver://localhost/H-AHMADRAZA:1433;databaseName=TestJava","testjava","ahmad"); PreparedStatement st=conn.prepareStatement(query); st.executeUpdate(query); conn.close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)