Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PROBLEMS POPULATING TABLE FROM PL/SQL

Status
Not open for further replies.

prosuc

Programmer
Aug 14, 2002
53
CL
I want to create a block from a pl/sql procedure, so this is my first time with this function I tried with a simple sql-statement (using Data Block Wizard) but when I do 'execute_query' developer return the following error message:

FRM-40505:ORACLE error: unable to perform the query.

I have problems too to select the 'Available Columns' in the Datablock Wizard, I have all columns repeated...why???

my PROGRAM UNITS :

-- Package (spec)

PACKAGE model IS
TYPE model_rec IS RECORD(
cod my_table.cod_field%TYPE,
description my_table.desc_field%TYPE);

TYPE model_cursor IS REF CURSOR RETURN model_rec;
PROCEDURE query_select(
result IN OUT model_cursor);

END;

------------------------------------------------------

-- Package (body)

PACKAGE BODY model IS
PROCEDURE query_select(
result IN OUT model_cursor) IS
BEGIN
OPEN result
FOR
SELECT t.cod_field,
t.desc_field
FROM my_table b;
END;
END;
 
Sorry,
my developer's version is:
FORMS 6i on Windows 98
 
Using b as table alias in package body is probably a typo.
Though I can create a block based on your procedure. Can you provide more detailed error text using Display Error?
 
Hi,

I think that's because in your block there's a field that is not a database item... so find that field inside your block and change it's properties : database to NO.

I hope this can help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top