Batch execution



import java.sql.*;
class BatchDemo
{
public static void main(String s2[])
{
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:syam");
Statement st=con.createStatement();

String str1="insert into login values('s','g')";
st.addBatch(str1);
String str2="insert into login values('q','w')";
st.addBatch(str2);
st.executeBatch();


}catch(Exception e){System.out.println(e);}
}
}


Responses

0 Respones to "Batch execution"

Post a Comment

 

Recent Comments

Popular Posts

Return to top of page Copyright © 2010 | Platinum Theme Converted into Blogger Template by HackTutors