当前位置: 代码迷 >> J2SE >> oracle数据库查询出现: java.sql.SQLException: 列名无效 异常,怎么解决?
  详细解决方案

oracle数据库查询出现: java.sql.SQLException: 列名无效 异常,怎么解决?

热度:111   发布时间:2016-04-24 15:53:50.0
oracle数据库查询出现: java.sql.SQLException: 列名无效 错误,如何解决???
java.sql.SQLException:   列名无效
at   oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at   oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at   oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at   oracle.jdbc.driver.OracleStatement.get_column_index(OracleStatement.java:5971)
at   oracle.jdbc.driver.OracleResultSetImpl.findColumn(OracleResultSetImpl.java:1527)
at   oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1482)
at   com.inventec.das.dao.ServicesDAO.addRecordsSet(ServicesDAO.java:213)
at   com.inventec.das.dao.ServicesDAO.getAllXMLStrBySQL(ServicesDAO.java:147)
at   com.inventec.das.services.Services.getAllXMLStrBySQL(Services.java:43)
at   com.inventec.das.services.Services.main(Services.java:82)
com.inventec.das.exception.WebServicesException:   Web   services   error:
Access   database   Error:列名无效
at   com.inventec.das.dao.ServicesDAO.addRecordsSet(ServicesDAO.java:245)
at   com.inventec.das.dao.ServicesDAO.getAllXMLStrBySQL(ServicesDAO.java:147)
at   com.inventec.das.services.Services.getAllXMLStrBySQL(Services.java:43)
at   com.inventec.das.services.Services.main(Services.java:82)



------解决方案--------------------
很明显啊,数据库没有你要的列,
在数据库加这个列或者程序拼写错误了。
------解决方案--------------------
1 检查属性的类型
2 检查属性的位数
  相关解决方案