在线急等:ORA00942错误!

辰爸 2009-11-30 03:41:44
表或者视图不存在,使用plus/sql查讯的时候没有问题,可是在程序中报这个错误,已经在表前面加上了该表所属的用户名!
...全文
566 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
辰爸 2009-12-05
  • 打赏
  • 举报
回复
[Quote=引用 14 楼 java3344520 的回复:]
你的程序连接上ORACLE了?
突然想这么问
[/Quote]
连接上了啊!~
jamejame 2009-11-30
  • 打赏
  • 举报
回复
这个应该是人为的疏忽,请楼主认真检查!
wh62592855 2009-11-30
  • 打赏
  • 举报
回复
建议楼主认真检查一下自己的操作流程
有时候这些奇怪的问题只是因为一个细节的疏忽
wh62592855 2009-11-30
  • 打赏
  • 举报
回复
ORA-00942: table or view does not exist
Cause: The table or view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required. Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.
Action: Check each of the following:

the spelling of the table or view name.
that a view is not specified where a table is required.
that an existing table or view name exists.
Contact the database administrator if the table needs to be created or if user or application privileges are required to access the table.

Also, if attempting to access a table or view in another schema, make certain the correct schema is referenced and that access to the object is granted.

iqlife 2009-11-30
  • 打赏
  • 举报
回复
你的程序连接上ORACLE了?
突然想这么问
Dave 2009-11-30
  • 打赏
  • 举报
回复

程序的代码没有问题,我是将语句存在MSSQL中,从里面读取出查询语句后在程序里调用查询语句!

--可以做测试, 先把数据读取出来,手动的执行下看看.. 是不是某个环节出错了?





------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
archwuke1 2009-11-30
  • 打赏
  • 举报
回复
这种问题大多应该是自己哪里不小心造成的吧,
电脑通常不会范这样的低级错误
辰爸 2009-11-30
  • 打赏
  • 举报
回复
[Quote=引用 10 楼 tianlesoftware 的回复:]
在Admin下的表a使用read连接的,用read在PL/SQL中可以查询,在程序中就不可以了

--- 检查程下序的代码,如果说在pl/sql 里能查,在程序里也是没有问题的。


------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
[/Quote]
程序的代码没有问题,我是将语句存在MSSQL中,从里面读取出查询语句后在程序里调用查询语句!
Dave 2009-11-30
  • 打赏
  • 举报
回复


在Admin下的表a使用read连接的,用read在PL/SQL中可以查询,在程序中就不可以了

--- 检查程下序的代码,如果说在pl/sql 里能查,在程序里也是没有问题的。





------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
辰爸 2009-11-30
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 jackyxfl 的回复:]
第一个可能是:这个用户没有权限
如果这个用户有这个权限,则你可以在表名中加入双引号比如
select * from "product";因为你的表可能是小写,而当你在查询的时候,他会自动则查询的表名转换为大写。
[/Quote]
查询的时候写的表名跟库中的一样(库中都是大写)
jackyxfl 2009-11-30
  • 打赏
  • 举报
回复
第一个可能是:这个用户没有权限
如果这个用户有这个权限,则你可以在表名中加入双引号比如
select * from "product";因为你的表可能是小写,而当你在查询的时候,他会自动则查询的表名转换为大写。
辰爸 2009-11-30
  • 打赏
  • 举报
回复
[Quote=引用 6 楼 tianlesoftware 的回复:]
程序中是以什么用户连接的? 有相应的权限吗? 顺便把问题描述清楚点,比如:

用户A下有表Ta, 在程序中用什么用户连的,如果是用户B, B是否有相应的权限? 在pl/sql里用用户B能否查询?


------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
[/Quote]
在Admin下的表a使用read连接的,用read在PL/SQL中可以查询,在程序中就不可以了
Dave 2009-11-30
  • 打赏
  • 举报
回复


程序中是以什么用户连接的? 有相应的权限吗? 顺便把问题描述清楚点,比如:

用户A下有表Ta, 在程序中用什么用户连的,如果是用户B, B是否有相应的权限? 在pl/sql里用用户B能否查询?










------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
网上资源: http://tianlesoftware.download.csdn.net
相关视频:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
Q Q 群:62697716
hackerwu 2009-11-30
  • 打赏
  • 举报
回复
建议把代码贴出来
辰爸 2009-11-30
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 hackerwu 的回复:]
字段名和你输入的可能不一样
[/Quote]
一样啊,排查过!
辰爸 2009-11-30
  • 打赏
  • 举报
回复
[Quote=引用 2 楼 java3344520 的回复:]
你用的用户有查询权限?
[/Quote]
有查询权限,在PL/SQL中就可以查!~
iqlife 2009-11-30
  • 打赏
  • 举报
回复
你用的用户有查询权限?
hackerwu 2009-11-30
  • 打赏
  • 举报
回复
字段名和你输入的可能不一样

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧