hello friends
i am getting unsupportedoperation exception when i run this
program
import java.sql.*;
public class batch
{
public static void main(
String arg[])
{
Connection conn=null;
ResultSet rs=null;
Statement stmt=null;
ResultSetMetaData rsmd=null;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
conn=DriverManager.getConnection("jdbc
dbc:rst");
stmt=conn.createStatement();
conn.setAutoCommit(false);
stmt.addBatch("INSERT INTO student " +
"VALUES('Amaretto', 49, 'm')");
stmt.addBatch("INSERT INTO student " +
"VALUES('Hazelnut', 49,'m' )");
stmt.addBatch("INSERT INTO student " +
"VALUES('Amaretto_decaf', 49,'m')");
stmt.addBatch("INSERT INTO student " +
"VALUES('Hazelnut_decaf', 49,'m')");
int [] updateCounts = stmt.executeBatch();
System.out.println("inserted");
}
catch(ClassNotFoundException e){}
catch(SQLException sq){}
}
}
there is no error but operation not supported.what to do
pl help me in this
thanks for all
bye
baskar