急,在线求助!关于ResultSet的问题!

[复制链接]
查看11 | 回复0 | 2006-9-26 01:04:31 | 显示全部楼层 |阅读模式
请大家看一下下面的这个程式是不是有什么问题阿??
为什么每次执行到rs = ps.executeQuery();的时候都会报错“类型长度大于最大值”呢?
R_GLS_GLSX 表中包含日期类型的字段!
我认为是ResultSet的问题,可是应该怎么修改呢?请大家明示!
先谢谢各位了!
public String GetTabData()throws Exception
{
//Connect OracleDB
Class.forName(\"oracle.jdbc.driver.OracleDriver\&quot

.newInstance();
String url=\"jdbc

racle:thin:@localHost:1231:11\";
String user=\"c3\";
String password=\"c3\";
ArrayList array =new ArrayList();
//Connection conn = this.getConnection();
PreparedStatement ps =null;
ResultSet rs = null;
StringBuffer strBuff = new StringBuffer();
String result = \"\";
String resultData = \" \";
//ArrayList resultData = new ArrayList();
try{
Connection conn= DriverManager.getConnection(url,user,password);
strBuff.append(\"select * from R_GLS_GLSX where glass_id=\'FJ0E4C1156\'\&quot

; //要求查询DB中所有的记录
ps = conn.prepareStatement(strBuff.toString());
rs = ps.executeQuery(); //报错“类型长度大于最大值”
ps.close();
rs.close();
conn.close();

}catch(Exception e)
{
throw new Exception(\"Error : \" + e.getMessage());
}
return resultData;
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行