Thread: PL/SQL help
View Single Post
  #1 (permalink)  
Old August 12th, 2003, 02:54 PM
Blue Blue is offline
Registered User
 
Join Date: Aug 2003
Location: Sault Ste. Marie, ON, Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default PL/SQL help

Hi,
I have a procedure runs well on sqlplus. But I can't get result from front-end which is implemented in Coldfusion.

The message said:

The QUERY attribute of the tag does not specify the name of an available query

Can any one help me to figure out what 's wrong with the Procedure, or with my coldfusion code.

--Procedure:
CREATE OR REPLACE PACKAGE PACK_keyword AS
  TYPE temp_contig_type IS RECORD
 (contigid contiginfo.contigid%TYPE,
  length contiginfo.length%TYPE,
  num_sequences contiginfo.num_sequences%TYPE,
  e_value contiginfo.e_value%TYPE,
  description contiginfo.description%TYPE,
  organism contiginfo.organism%TYPE,
  accession contiginfo.accession%TYPE,
  mnum mbcinfo.mgo_num%TYPE,
  mlink mbcinfo.mlink%TYPE,
  mdesc mbcinfo.mgodesc%TYPE,
  bnum mbcinfo.bgo_num%TYPE,
  blink mbcinfo.blink%TYPE,
  bdesc mbcinfo.bgodesc%TYPE,
  cnum mbcinfo.cgo_num%TYPE,
  clink mbcinfo.clink%TYPE,
  cdesc mbcinfo.cgodesc%TYPE);

  TYPE CUR_contig IS REF CURSOR RETURN temp_contig_type;

  PROCEDURE PROC_keywordsearch
  (keyword_search IN contiginfo.description%type,
   temp_contig_type OUT CUR_contig);
END PACK_keyword;
/

SET SERVEROUTPUT ON;

--create package body

CREATE OR REPLACE PACKAGE BODY PACK_keyword AS
 PROCEDURE PROC_keywordsearch
 (keyword_search IN contiginfo.description%type, temp_contig_type OUT CUR_contig) IS
BEGIN
  OPEN temp_contig_type FOR
    select c.contigid, c.length, c.num_sequences, c.e_value, c.description, c.organism, c.accession,
    g.mgo_num, g.mlink, g.mgodesc, g.bgo_num, g.blink, g.bgodesc, g.cgo_num, g.clink, g.cgodesc
    from contiginfo c, mbcinfo g
    where c.description like '%arg_keyword%' and c.contigid = g.contigid (+);
 IF SQL%ROWCOUNT = 0 THEN
 dbms_output.put_line('Your requirement is not found.');
  END IF;
 END PROC_keywordsearch;
END PACK_keyword;
/

--CF code:
<cfstoredproc procedure = "BioWeb.PACK_keyword.PROC_keywordsearch"
  dataSource = "GLPH_O" username = "BioWeb"
  password = "4umm4" debug="yes"
  returnCode = "no">

  <cfprocparam type = "IN" dbvarname="keyword_search" CFSQLType = "CF_SQL_VARCHAR" value = "form.keyword">
  <cfprocparam type = "OUT" variable="temp_contig_type" CFSQLType = "CF_SQL_REFCURSOR">

  <cfprocresult name ="rs">
 </cfstoredproc>
<cfdump var=#BioWeb.PACK_keyword.PROC_keywordsearch#>

<cfoutput query="rs">

Your help is appricated.

Blue


DB developer