Results 1 to 1 of 1

Thread: return value from oracle..

  1. #1
    Join Date
    May 2004
    Location
    Jln ipot to B.Jalil
    Posts
    6
    Rep Power
    0

    return value from oracle..

    Pls help me how to write coldfusion procedure to calling oracle function.

    this is oracle function:


    FUNCTION Get_Load_Lock (pm_source IN VARCHAR2) RETURN BOOLEAN

    IS
    v_lock SNDSV_REF_CODES.rv_high_value%TYPE;

    BEGIN
    BEGIN
    SELECT rv_high_value INTO v_lock
    FROM SNDSV_REF_CODES
    WHERE rv_domain = 'E-EKSAIS'
    AND rv_type = 'CONTROL'
    AND rv_low_value = 'LOCK - '||pm_source
    AND record_status = 'E'
    FOR UPDATE OF rv_high_value NOWAIT;

    ROLLBACK;

    EXCEPTION WHEN OTHERS THEN
    v_lock := 'Y';
    END;

    IF v_lock = 'N' THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;

    END Get_Load_Lock;

    p/s: pm_source=PAYMENT


    Below is my cf program:
    <cfstoredproc procedure="GET_LOAD_LOCK" datasource="#dsntest#" returncode="yes">
    <cfprocparam type="IN" variable="pm_source" dbvarname="PM_SOURCE" value="PAYMENT" cfsqltype="CF_SQL_VARCHAR" >
    <cfprocparam type="OUT" variable="pm_lock" dbvarname="V_LOCK" cfsqltype="cf_sql_varchar">
    </cfstoredproc>

    error occurred:

    Diagnostics : ODBC Error Code = 37000 (Syntax error or access violation)

    [Microsoft][ODBC driver for Oracle]Syntax error or access violation

    SQL = "GET_LOAD_LOCK"
    Data Source = "VSALES3"

    thx ya...
    Last edited by shakker; 23-08-2004 at 09:44 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help and your time, for nothing in return!
    By Seanie in forum Website Programming
    Replies: 9
    Last Post: 07-07-2009, 09:38 AM
  2. Small Investment, Big Return!!!
    By campb in forum Mamak Stall
    Replies: 2
    Last Post: 22-08-2004, 06:38 PM
  3. Return oracle function value to coldfusion
    By shakker in forum Website Programming
    Replies: 5
    Last Post: 08-07-2004, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37