Go Back   Webmaster Malaysia Forum » Website Design & Development » Website Programming

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 23-08-2004, 09:38 AM
New kid on the block
 
Join Date: May 2004
Location: Jln ipot to B.Jalil
Posts: 6
Rep Power: 0
shakker is on a distinguished road
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Return oracle function value to coldfusion shakker Website Programming 5 08-07-2004 03:11 PM
oracle client problem... Bandit Website Programming 2 11-07-2003 12:36 PM
oracle express administrator aarkus Website Programming 0 19-06-2003 09:37 AM
Oracle 9i Report Distribute kdiamond Website Programming 0 13-05-2003 03:19 PM



All times are GMT +8. The time now is 01:35 PM. Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.


WebmasterMalaysia.com is Proudly Hosted by Exabytes Semi Dedicated Server.

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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58