sql - Database results not sorted in Java (jTDS) -


i have isssue java application. result returned stored-procedure (sql server) not sorted in java in mssms. when execute sp in mssms result sorted should be. in java application somehow result not sorted.

here code:

public static void main(string[] args) throws instantiationexception, illegalaccessexception {   try {     class.forname("net.sourceforge.jtds.jdbc.driver");     connection conn = drivermanager.getconnection(jdbc:jtds:sqlserver://srv:1433/db", "usr", "pwd" );     preparedstatement ps = conn.preparestatement( "exec my_sp @userid = '159888'");     resultset rs = ps.executequery();     while( rs.next() )       system.out.println("isfirst: " + rs.isfirst() + ", name: " + rs.getstring("fullname"));     rs.close();     ps.close();     conn.close();  } catch (classnotfoundexception e) {    e.printstacktrace();  } catch (sqlexception e) {    e.printstacktrace();  } } 

can me please issue?

edit: tried use jdbc driver microsoft - same issue. result unsorted reason.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -