M
mycwcgr
Unregistered / Unconfirmed
GUEST, unregistred user!
在Java中执行SQL Sever 2000中存贮过程getpage(带参数的存贮过程),为什么不能返回结果集
下面rs结果集中,没有一行记录,而我在SQL Sever 2000中执行exec getpage 'select * from project_info',2,2
却能返回记录!
Class.forName(comm_availble.class_forname);
conn=DriverManager.getConnection(comm_availble.url,comm_availble.user,comm_availble.password);
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
sql="exec getpage 'select * from project_info',2,2";
ResultSet rs;
rs=stmt.executeQuery(sql);
package server;
public class comm_availble {
public static String url="jdbc:microsoft:sqlserver://ccww:1433;DatabaseName=cwjava";
public static String class_forname="com.microsoft.jdbc.sqlserver.SQLServerDriver";
public static String user="cw";
public static String password="aaa";
}
下面rs结果集中,没有一行记录,而我在SQL Sever 2000中执行exec getpage 'select * from project_info',2,2
却能返回记录!
Class.forName(comm_availble.class_forname);
conn=DriverManager.getConnection(comm_availble.url,comm_availble.user,comm_availble.password);
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
sql="exec getpage 'select * from project_info',2,2";
ResultSet rs;
rs=stmt.executeQuery(sql);
package server;
public class comm_availble {
public static String url="jdbc:microsoft:sqlserver://ccww:1433;DatabaseName=cwjava";
public static String class_forname="com.microsoft.jdbc.sqlserver.SQLServerDriver";
public static String user="cw";
public static String password="aaa";
}