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

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 25-06-2004, 03:46 PM
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 oracle function value to coldfusion

How to return value from Oracle function to coldfusion?.

Below is oracle function:

e.g:
pm_outlet_id=210 (number)
pm_part_no=15601-87Z01-000 (varchar)


---------------------------
Function Get_Price (pm_outlet_id IN Number,pm_part_no IN Varchar2)
Return Number Is

v_price Number(10,2);

Begin
BEGIN
Select nvl(unit_list_price,0)
Into v_price
From Pos_Price_Lists_Ext_V price,
Pos_Customers_V cust,
Wcs_Outlet_Master_Test dlr
Where cust.customer_number = dlr.outlet_code
And price.price_list_name = cust.pos_price_list
And price.org_id=13
And price.part_no = pm_part_no
And dlr.outlet_id = pm_outlet_id
And trunc(price.start_date) <= trunc(sysdate)
And (trunc(end_date) >= trunc(sysdate) or end_date is null);

Exception When No_Data_Found Then
v_price :=0;
End;
Return(v_price);
End;

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

Oracle function will passed 8.9 as answer. The problem is how coldfusion can read value 8.9 from oracle function as output. What coding can use??. If anybody know..pls help me...I'have tried using cf tag cfstoredproc but still have error...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 28-06-2004, 12:13 AM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
still blur what u want... ape output yg you nak sebenarnye
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 28-06-2004, 08:14 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
Output: v_price= 8.9. Ini yg i nak. I dah try cfstoredproc,cffunction,cfcomponent untuk panggil function dr oracle tp still tak keluar output. Kalau u tahu..sila lah bagitau.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 28-06-2004, 03:20 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
u nak set v_price = 8.9?
cam tu ke?
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 30-06-2004, 02:14 PM
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
Quote:
Originally posted by hymns
u nak set v_price = 8.9?
cam tu ke?
yes....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 08-07-2004, 03:11 PM
hymns's Avatar
Senior Webmaster
 
Join Date: Nov 2001
Location: Johor
Posts: 768
Rep Power: 98
hymns is on a distinguished road
Send a message via ICQ to hymns Send a message via Yahoo to hymns
using

1) cfquery for the oracle
2) cfouput for the math function
3) cfset the result for variable
__________________
I hate when:

vBulletin Message:
Sorry! The administrator has specified that users can only post one message every 60 seconds
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 value from oracle.. shakker Website Programming 0 23-08-2004 09:38 AM
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 10:31 AM. 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