Ask a Question related to Coldfusion Database Access, Design and Development.
-
dragoshbalan #1
Calling Oracle overloaded stored procedures from CF 6.1
Did any of you tried to call an Oracle overloaded stored procedure from CF 6.1?
You will be amazed to know that it doesn't work. :))
Please test this :
Write two Oracle stored procedures having the same name but different
parameters :
CREATE OR REPLACE PACKAGE BODY Test
AS
-- one parameter --
PROCEDURE TestProc(y OUT ref_cursor)
IS
BEGIN
OPEN y FOR SELECT 1 FROM dual;
END TestProc;
-- 2 parameters
PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor)
IS
BEGIN
OPEN y FOR SELECT 2 FROM dual;
END TestProc;
END;
Don't forget to write also the specification of the package and then try to
call one of these procedures from coldfusion :
<CFSTOREDPROC procedure="TEST.TESTPROC" datasource="DS" username="USER"
password="PASS">
<cfprocparam type="In" cfsqltype="cf_sql_varchar" value="param" >
<cfprocresult name="rezultat">
</CFSTOREDPROC>
Anctiously waiting.....
dragoshbalan Guest
-
Stored Procedures with Date data types and Oracle
This should be easy.... But i keep getting the error: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to... -
Oracle Thin Client and Stored Procedures
We have a stored procedures in Oracle that we are trying to call from ColdFusion MX 7 using the Oracle Thin Client. The request hangs -- we never... -
Calling Multiple Stored Procedures inside a cfquery
All, I have ColdFusion page that contains a Company dropdown, a To Date and From Date and submit button The user can select an ?individual... -
Cannot view Oracle Stored Procedures in Dreamweaver XP
Does anyone know how to get round this? I've defined and tested the connection to the Oracle database and everything seems to work OK, but when I... -
Calling stored procedures from Access modules
I am upgrading an Access app for a client to SQL Server. I'd like to convert many of his queries into stored procedures but I will need a way to... -
CF_Oracle #2
Re: Calling Oracle overloaded stored procedures from CF6.1
You don't use parameter x in the second stored procedure. Hopefully you created
these procedures first with ref_cursor declared. Please send full right code
and I could test it in CF 7 with Oracle9i to compare if problem still exists.
CF_Oracle Guest
-
dragoshbalan #3
Re: Calling Oracle overloaded stored procedures from CF6.1
Nice to see that someoune watches over this forum,
Yes you're right I didn't use the x parameter , but remember this is only a
test procedure , I don't think it matters I only want to show you a "strange"
situation ....
Here is the complete source :
Oracle code :
1.Package specification :
CREATE OR REPLACE PACKAGE Test
AS
TYPE ref_cursor IS REF CURSOR;
PROCEDURE TestProc(y OUT ref_cursor);
PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor);
END;
2. Here is the body:
CREATE OR REPLACE PACKAGE BODY Test
AS
-- one parameter --
PROCEDURE TestProc(y OUT ref_cursor)
IS
BEGIN
OPEN y FOR SELECT 1 FROM dual;
END TestProc;
-- 2 parameters
PROCEDURE TestProc(x VARCHAR2, y OUT ref_cursor)
IS
BEGIN
OPEN y FOR SELECT 2 FROM dual;
END TestProc;
END;
3. The coldfusion code is the same , just place the call to one of these
procedures in any page.
<CFSTOREDPROC procedure="TEST.TESTPROC" datasource="DS" username="USER"
password="PASS">
<cfprocparam type="In" cfsqltype="cf_sql_varchar" value="param" >
<cfprocresult name="rezultat">
</CFSTOREDPROC>
For any other question don't hesitate to request.
Thanks .
dragoshbalan Guest
-
CF_Oracle #4
Re: Calling Oracle overloaded stored procedures from CF6.1
Did you look at refcursor problem there?
[url]http://livedocs.macromedia.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=0 0000313.htm[/url]
CF_Oracle Guest
-
dragoshbalan #5
Re: Calling Oracle overloaded stored procedures from CF6.1
As far as I can understand the topic refers to "cursors passed as parameters".
This is not our case .
Thanks.
dragoshbalan Guest
-
CF_Oracle #6
Re: Calling Oracle overloaded stored procedures from CF6.1
I re-created this package in Oracle 9i and modified code for calling storedproc
to
<CFSTOREDPROC procedure="TEST.TESTPROC" datasource="#REQUEST.DSN#">
<cfprocparam type="OUT" cfsqltype="cf_sql_refcursor" value="2">
<cfprocresult name="rezultat">
</CFSTOREDPROC>
Got error:
Error Executing Database Query.
[Macromedia][Oracle JDBC Driver]The specified SQL type is not supported by
this driver.
The error occurred in C:\Inetpub\wwwroot\... line 38
36 :
37 : <cfprocparam type="OUT" cfsqltype="cf_sql_refcursor" value="2">
38 : <cfprocresult name="rezultat">
39 : </CFSTOREDPROC>
By the way we run CF 7 and according to documentation cf_sql_refcursor is
valid type.
Good luck in your search!
CF_Oracle Guest
-
CF_Oracle #7
Re: Calling Oracle overloaded stored procedures from CF6.1
One more thing if it could help you: when I omit this refcursor parameter or
put different type there was another error:
[Macromedia][Oracle JDBC Driver][Oracle]ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'TESTPROC' ORA-06550:
line 1, column 7: PL/SQL: Statement ignored
CF_Oracle Guest
-
dragoshbalan #8
Re: Calling Oracle overloaded stored procedures from CF6.1
So you received the same error as mine ,only that you work with ColdFusioon 7.
I think somebody from macromedia support must be noticed !
dragoshbalan Guest
-
dragoshbalan #9
Re: Calling Oracle overloaded stored procedures from CF6.1
I just received a notification from Macromedia's Documentation Manager sayin'
"I checked and am sorry to say that this isn't supported. There is a bug
for this issue, 53122, but it hasn't been addressed. "
So the bug is confirmed. Good to know that somebody watches over this forum .
Waiting the fix.
:
dragoshbalan Guest



Reply With Quote

