首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

query error:ORA-00911: 无效字符解决方法

2012-03-01 
query error:ORA-00911: 无效字符在运行这句的时候出现的ResultSet rs dbc.executeQuery(sql)private C

query error:ORA-00911: 无效字符
在运行这句的时候出现的ResultSet rs = dbc.executeQuery(sql);

private ConnOracle dbc = new ConnOracle();

public ResultSet executeQuery(String sql) {
  try {
  rs = getStatement().executeQuery(sql);
  } catch (SQLException ex) {
  System.err.println("query error:" + ex.getMessage());
  }
  return rs;
  }

[解决办法]
ORA-00911 invalid character

Cause: Special characters are valid only in certain places. If special characters other than $, _, and # are used in a name and the name is not enclosed in double quotation marks ("), this message will be issued. One exception to this rule is for database names; in this case, double quotes are stripped out and ignored.

Action: Remove the invalid character from the statement or enclose the object name in double quotation marks.


[解决办法]
把sql语句的内容贴到oracle 中运行一下就知道是哪里有问题了!
[解决办法]
SQL?

引用楼主 wqfwuliao 的帖子:
在运行这句的时候出现的ResultSet rs = dbc.executeQuery(sql);

private ConnOracle dbc = new ConnOracle();

public ResultSet executeQuery(String sql) {
try {
rs = getStatement().executeQuery(sql);
} catch (SQLException ex) {
System.err.println("query error:" + ex.getMessage());
}
return rs;
}

热点排行
Bad Request.