The scenario is like that. User will specify a database table name and the system will retrieve and display all the data stored in the specified informix database table.
Class.forName("com.informix.jdbc.IfxDriver");
Connection conn = DriverManager.getConnection(connUrl)
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from an_ifx_table");
The an_ifx_table is any table name specified by user. The problem is there is a column defined with BigSerial data type. So, the code will always throw an exception:
java.sql.SQLException: bigserial
at com.informix.jdbc.IfxSqli.a(IfxSqli.java:3204)
at com.informix.jdbc.IfxSqli.E(IfxSqli.java:3518)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2353)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2269)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1428)
at com.informix.jdbc.IfxSqli.executeStatementQuery(IfxSqli.java:1401)
at com.informix.jdbc.IfxResultSet.a(IfxResultSet.java:204)
As which table the system is retrieving the data from is going to be specified by user, we can't skip or cast the column with BigSerial data type.
Any suggestion to handle this scenario?