Hello to all of the participants. This is my first blog. This is a program to execute .sql file which contains bunch of sql statements. I have used iBatis package it's compling and executing with out any mistakes, but resulting nothing. I have tried in both 2.3 and 2.0 release also. Can any one make the required correct.
public class JConn
public static void main(String args) throws SQLException
Connection con = null;
con = DriverManager.getConnection("jdbc:oracle:thin:@localhost:orcl","scott","tiger");
ScriptRunner sr = new ScriptRunner(con,false,false);
FileReader fr = new FileReader(new File("D:/scripts.sql"));
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!