Hi am just selecting Data from SQL SERVER and stroing it in Result set. I am getting below error.
**JDBC ERROR : AbstractMethodError: com.microsoft.sqlserver.jdbc.SQLServerConnection.createArrayOf(Ljava/lang/String;[Ljava/lang/Object;)Ljava/sql/Array**
The problem with this below line
java.sql.Array sqlarray = sqlcon.createArrayOf(null, rowValues.toArray());
I am not sure why this issue occurs and what exact parameter should I pass createArrayOf().. Please help for this below issue
Here is full my code
public void getDatafromsql(ArrayList rowValues) throws SQLException,ClassNotFoundException
{
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
System.out.println("SQL Server Start Connecting ");
Connection sqlcon = DriverManager
.getConnection(s_url, s_username, s_password);
System.out.println("Sql server Connection valid");
System.out.println(rowValues);
PreparedStatement s1 = sqlcon.prepareStatement("SELECT TOP 6 myid,document,name FROM table1 where DATEMODIFIED between ? and ? and myid in (?)");
s1.setTimestamp( 1,V_DOC_LAST_REFRESH_TIMESTAMP);
s1.setTimestamp( 2,V_DOC_CURRENT_REFRESH_TIMESTAMP);
//Below line throwing error
java.sql.Array sqlarray = sqlcon.createArrayOf(null, rowValues.toArray());
s1.setArray(3, sqlarray);
sql_rs = s1.executeQuery();
setdataOracle(sql_rs);
System.out.println("SQL Server Storage Completed ");
sqlcon.close();
}