ora-306500 [message #86850] |
Wed, 10 November 2004 09:32  |
Antonia.
Messages: 2 Registered: November 2004
|
Junior Member |
|
|
Hi All,
I am using Forms 6i & Oracle 8i. I am trying to connect to 2 different Users/Databases, using EXEC_SQL package. Everything is going fine(select), but when I try to Execute a query in one of the connections, it raises Error while Parsing. I have written like this:
curs := EXEC_SQL.OPEN_CURSOR;
sql_stmt := 'SELECT...'
EXEC_SQL.PARSE(curs, sql_stmt );
Parsing statement is raisng the Error: ORA-306500
Thanks in Advance
|
|
|
Re: ora-306500 [message #86855 is a reply to message #86850] |
Thu, 11 November 2004 19:47   |
Frank Naude
Messages: 4595 Registered: April 1998
|
Senior Member |
|
|
Hi,
You may be hitting the problem described in Metalink Note: 161986.1: "Using EXEC_SQL Raises Error FRM-40735 and ORA-306500"
Proposed solution: check if your connect string includes the userid/password:
conn_str varchar2(100) :='scott/tiger@orcl.world';
...
conn := exec_sql.open_connection(conn_str);
Best regards.
Frank
|
|
|
|
Re: ora-306500 [message #123283 is a reply to message #120634] |
Sat, 11 June 2005 06:10   |
zak498
Messages: 1 Registered: June 2005 Location: Pakistan
|
Junior Member |
|
|
try this in your connect string
connection_id := EXEC_SQL.OPEN_CONNECTION('user','pw','alias');
and tell
zahid
|
|
|
Re: ora-306500 [message #138689 is a reply to message #123283] |
Fri, 23 September 2005 01:20   |
salman2k960
Messages: 12 Registered: September 2005
|
Junior Member |
|
|
aoa
short answer...........CHECK UR SQL STATEMENT ON SQL PROMPT FIRST.
EXPLANATION:
i was experiencing the same problem. actually,i recieved this error a month ago. at that time,there was some previliges problem that i fixed.but now,after a month or so,i got this message again.lemme explain my previous solution first:
i was connected by user "A_user" and was executing following insert statement :
cursorID := EXEC_SQL.OPEN_CURSOR;--(connection_id);
linebuf1:= 'insert into b_user.b_user_table_name values(x,y,z)';
EXEC_SQL.PARSE(cursorID, linebuf1, exec_sql.V7);--err here
.....................
so,the problem was solved when i granted insert on
b_user.b_user_table_name to A_user.
but now,one very fine morning....i started recieving the message again.after a bit of work out,i executed the statement in linebuf1 on my sql prompt...i recieved this error 
not enuff values....
then i came 2 remember dat i have added new columns to my table which neither i have included in "INTO" clause nor the "VALUES" clause of linebuf1 . so i changed linebuf1 to:
linebuf1:= 'insert into b_user.b_user_table_name(col_x,col_y,col_z) values(x,y,z)';
its fixed now
i hope this will solve ur prob.inshallah.
duaon main yaad rkhna.
maani.
tc & AH
|
|
|
Re: ora-306500 [message #186724 is a reply to message #138689] |
Wed, 09 August 2006 04:22   |
haitham
Messages: 60 Registered: February 2006
|
Member |
|
|
i wrote the following code:
declare
connection_id EXEC_SQL.CONNTYPE;
cursorID EXEC_SQL.CURSTYPE;
sqlstr VARCHAR2(1000);
begin
connection_id := EXEC_SQL.OPEN_CONNECTION('abc/abc@oracle');
cursorID := EXEC_SQL.OPEN_CURSOR(connection_id);
sqlstr := 'CREATE USER '||:USERID ||' IDENTIFIED BY '||:PASS;
EXEC_SQL.PARSE(connection_id, cursorID, sqlstr, exec_sql.V7);
on debug mode at the last statement
,unhandled exception is raised ora-306500. so why this happens ??
plz reply ..
thanx
|
|
|
|