Can anyone tell me why I am receiving the syntax error #307,
"too many declarations of 'COLUMN_VALUE' match this call.
I tried with following example from "Oracle7 Server Application
Developer's Guide"
within:
Forms [32 Bit] Version 4.5.7.1.6 (Production)
Oracle7 Server Release 7.3.4.0.0 - Production
With the distributed, replication and parallel query options
PL/SQL Release 2.3.4.0.0 - Production
Oracle Toolkit Version 2.3.6.9.0 (Production)
PL/SQL Version 1.2.1.5.0 (Production)
Oracle Procedure Builder V1.5.6.15.3 - Production
PROCEDURE testdyn(source IN VARCHAR2,
destination IN VARCHAR2) is
id NUMBER;
name VARCHAR2(30);
birthdate DATE;
source_cursor INTEGER;
destination_cursor INTEGER;
ignore INTEGER;
BEGIN
- prepare a cursor to select from the source table
source_cursor := dbms_sql.open_cursor;
DBMS_SQL.PARSE(source_cursor,
'SELECT id, name, birthdate FROM ' || source,
2);
DBMS_SQL.DEFINE_COLUMN(source_cursor, 1, id);
DBMS_SQL.DEFINE_COLUMN(source_cursor, 2, name, 30);
DBMS_SQL.DEFINE_COLUMN(source_cursor, 3, birthdate);
ignore := DBMS_SQL.EXECUTE(source_cursor);
- prepare a cursor to insert into the destination table
destination_cursor := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(destination_cursor,
'INSERT INTO ' || destination ||
' VALUES (:id, :name, :birthdate)',
2);
LOOP
IF DBMS_SQL.FETCH_ROWS(source_cursor)>0 THEN
- get column values of the row
DBMS_SQL.COLUMN_VALUE(source_cursor, 1, id);
DBMS_SQL.COLUMN_VALUE(source_cursor, 2, name);
<<<-----error #307
DBMS_SQL.COLUMN_VALUE(source_cursor, 3, birthdate);
DBMS_SQL.BIND_VARIABLE(destination_cursor, 'id', id);
DBMS_SQL.BIND_VARIABLE(destination_cursor, 'name', name);
DBMS_SQL.BIND_VARIABLE(destination_cursor, 'birhtdate',
birthdate);
ignore := DBMS_SQL.EXECUTE(destination_cursor);
ELSE
EXIT;
END IF;
END LOOP;
....
Appreciate any help.
Received on Wed Jan 13 1999 - 11:15:38 CST