SQL STATE 42601
In my java program I am opening database connection 3-4 times .
This is one of them the same with others but IBM RAD gives error to this code
If I remove try catch block RAD gives error to all lines in try block.
RAD error is this :
Unhandled exception type SQlException
Connection con=null;
Statement stmt_on_kayit =null;
try{
Driver d = (Driver) Class.forName("com.ibm.db2.jcc.DB2Driver").newInstance();
con = DriverManager.getConnection(url, userId, password); stmt_on_kayit = con.createStatement();
rs_check=stmt_on_kayit.executeQuery(sql_counter2);
}catch (Exception e){
System.out.println("XXX Error 1="+ e.toString() );
}
Console log gives this output:
[9/19/06 17:03:56:809 EEST] 59324199 SystemOutO XXX Error 1 =com.ibm.db2.jcc.b.SqlException: DB2 SQL error: SQLCODE: -104, SQLSTATE
: 42601, SQLERRMC: ,;MAIN_COUNTER = '970';<space>
Why output writesMAIN_COUNTER = '970';<space> because this is my database table colon name.
And what is my solution?
Any suggestion !!!

