比如代码如下:
oraclecommand ocmd=new oraclecommand();
ocmd.commandtext="sys.mypredure";
ocmd.commandtype=commandtype.predure;
ocmd.exeutenonquery();
会报错:
必须声明sys.mypredure标识符!
应该如何修改代码?
还有就是如何在存储过程中显式授予权限?
我用grant create any table to scott;
这句写在begin块中不对,应该写在哪?
还有就是这句:
create or replace predure scott.mypredure(owner in sys.dba_tables.owner%type,tablename in sys.dba_tables.table_name%type)
这句不对,
也提示:必须声明sys.dba_tables标识符!
我知道是授权的问题,但具体怎么授权?语句怎么写?写在哪啊?请高手指教!
oraclecommand ocmd=new oraclecommand();
ocmd.commandtext="sys.mypredure";
ocmd.commandtype=commandtype.predure;
ocmd.exeutenonquery();
会报错:
必须声明sys.mypredure标识符!
应该如何修改代码?
还有就是如何在存储过程中显式授予权限?
我用grant create any table to scott;
这句写在begin块中不对,应该写在哪?
还有就是这句:
create or replace predure scott.mypredure(owner in sys.dba_tables.owner%type,tablename in sys.dba_tables.table_name%type)
这句不对,
也提示:必须声明sys.dba_tables标识符!
我知道是授权的问题,但具体怎么授权?语句怎么写?写在哪啊?请高手指教!
ocmd.commandtext="sys.mypredure";
ocmd.commandtype=commandtype.predure;
ocmd.exeutenonquery();
补充一句:
我的conn是用scott登录连接的。谢谢
授权这种事情,只要做一次就行了,没必要写在过程里面吧?
grant select, insert, update, delete on dba_tables to scott;
还有,java的东东,本人不熟=,=