Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2003, 02:54 PM
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




Similar Threads
Thread Thread Starter Forum Replies Last Post
PL/SQL Somesh ASP.NET 1.0 and 1.1 Basics 7 December 15th, 2006 05:49 PM
PL/SQL Cursor help Wikked Oracle 1 March 12th, 2005 01:19 AM
PL/SQL cooldude87801 Oracle 1 March 3rd, 2005 10:54 AM
PL/SQL i need help loveboy23 Oracle 3 January 6th, 2005 01:14 AM
PL/SQL help carly_1 Oracle 1 October 19th, 2003 08:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.