import java.sql.*;
import extractor.SCA_API.*;//import ΊΠΌ®±β.

public class Insert{
	public void setDBValue(String compName, String compType, String home, String remote){
		extractor.SCA_API.DBConnection dbCon = null;
		Connection con = null;
		Statement stmt = null;

		try{
			dbCon = new extractor.SCA_API.DBConnection();
			con = dbCon.getConnection();
			stmt = con.createStatement();
			
			System.out.println("Connected to DB...");
			//String query = "insert into COMPENTITY values ('" + compName + "',  '" + compType + "', '" + home + "', '" + remote + "' )";
			
			int result = stmt.executeUpdate("insert into COMPENTITY " + 
									"values ('compName', 'compType', 'home', 'remote')");
		
			System.out.println("result = " + result);
			con.commit();	
			stmt.close();
			con.close();			
		}catch(SQLException ex){
			System.out.print("SQLException : ");
			System.out.println( ex.getMessage());
		}		
	}
	
	public static void main(String[] args){
		Insert in = new Insert();
		in.setDBValue("String compName", "String compType", "String home", "String remote");
	}
		
}
