Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication1;
- import java.sql.*;
- public class jbdc {
- public static void main(String[] args) throws Exception{
- Class.forName("com.microsoft.sqlserver.jbdc.SQLServerDriver");
- Connection con = DriverManager.getConnection("jbdc:sqlserver://BTR3-Demo;"
- + "databaseName=sqbd;user=sa;password=aptech");
- con.setAutoCommit(false);
- Statement st=con.createStatement();
- st.addBatch("insert into person values('13','name1','email1',25,)");
- st.addBatch("insert into person values('14','name2','email2',45,)");
- st.addBatch("insert into person values('15','name3','email3',19,)");
- st.addBatch("insert into person values('16','name4','email4',,)");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement