I am developing an application in Java. I have to execute Sybase bulk LOAD command through my code.
I am doing it like this:
Connection conn = DriverManager.getConnection(<url_string>);
Statement st = conn.createStatement();
Boolean result = st.execute("load into table .... using client file.... ");
if(result) {
SUCCESS;
} else {
FAILED;
}
The command is getting executed successfully and the data is getting loaded to my table. The problem which I have is, I want to capture the logs which comes if we execute the same command through dbisql.
Using this approach I can only the result weather it is successful or failed. Though I am able to create the log files using MESSAGES options of LOAD command but I was wondering if there is any other way to capture the command line output too.
Problem solved by executing the command through exec()
method of java.lang.Runtime
class.