请大家帮忙看一下哪里出错了?
存储过程getUserRole:
CREATE PROC dbo.getUserRole
AS
create table tempt(userName varchar(20),userXM varchar(20),roleName varchar(8000))
insert into tempt
select b.userName,b.userXM,a.roleName from scopeManage_role a,scopeManage_user b
where charindex( ', '+rtrim(a.roleId)+ ', ', ', '+b.roleId+ ', ')> 0
select * from tempt
drop table tempt
GO
JAVA调试文件:
import java.sql.*;
import java.util.*;
import com.data.DataControl;
public class UtilUser {
private static CallableStatement callsta;
public static void getAll() {
DataControl db = new DataControl();
try {
callsta=db.getCon().prepareCall( "{call getUserRole} ");
System.out.print(callsta.execute());
ResultSet re=callsta.getResultSet();
while(re.next())
{
System.out.println(re.getString( "userName "));
}
} catch (
SQLException e) {
&