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);}
}
} Labels: Java
Responses
0 Respones to "Batch execution"
Post a Comment