473,698 Members | 2,434 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Oracle Wrong number or types of arguments error

dmjpro
2,476 Top Contributor
this is my funciton block in oracle .......

Function PIM_TEST
( param1 IN DATE DEFAULT SYSDATE,
param2 IN OUT DATE)
RETURN DATE IS
--
-- To modify this template, edit file FUNC.TXT in TEMPLATE
-- directory of SQL Navigator
--
-- Purpose: Briefly explain the functionality of the function
--
-- MODIFICATION HISTORY
-- Person Date Comments
-- --------- ------ -------------------------------------------
new_date DATE;
-- Declare program variables as shown above
BEGIN
new_date := param1;
RETURN new_date ;
--EXCEPTION
--WHEN exception_name THEN
--statements ;
END; -- Function PIM_TEST


my java code .......

CallableStateme nt function = l_con.prepareCa ll("{call PIM_TEST()}");
//function.setDat e(1,new Date(5000));
function.execut eQuery();


now my error is ........

java.sql.SQLExc eption: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PIM_TEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
void oracle.jdbc.dri ver.OracleState ment.doExecuteW ithTimeout()
int oracle.jdbc.dri ver.OraclePrepa redStatement.ex ecuteUpdate()
java.sql.Result Set oracle.jdbc.dri ver.OraclePrepa redStatement.ex ecuteQuery()
void Pim_Test.main(j ava.lang.String[])
Exception in thread main


what should i do right now ....

plz help me out ....

many many thanxxx in advance ......
Mar 2 '07 #1
2 2746
r035198x
13,262 MVP
this is my funciton block in oracle .......

Function PIM_TEST
( param1 IN DATE DEFAULT SYSDATE,
param2 IN OUT DATE)
RETURN DATE IS
--
-- To modify this template, edit file FUNC.TXT in TEMPLATE
-- directory of SQL Navigator
--
-- Purpose: Briefly explain the functionality of the function
--
-- MODIFICATION HISTORY
-- Person Date Comments
-- --------- ------ -------------------------------------------
new_date DATE;
-- Declare program variables as shown above
BEGIN
new_date := param1;
RETURN new_date ;
--EXCEPTION
--WHEN exception_name THEN
--statements ;
END; -- Function PIM_TEST

my java code .......

CallableStateme nt function = l_con.prepareCa ll("{call PIM_TEST()}");
//function.setDat e(1,new Date(5000));
function.execut eQuery();

now my error is ........

java.sql.SQLExc eption: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PIM_TEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
void oracle.jdbc.dri ver.OracleState ment.doExecuteW ithTimeout()
int oracle.jdbc.dri ver.OraclePrepa redStatement.ex ecuteUpdate()
java.sql.Result Set oracle.jdbc.dri ver.OraclePrepa redStatement.ex ecuteQuery()
void Pim_Test.main(j ava.lang.String[])
Exception in thread main

what should i do right now ....

plz help me out ....

many many thanxxx in advance ......
Copied to Oracle forum and changed title
Mar 2 '07 #2
dmjpro
2,476 Top Contributor
finally i managed to do solve the problem ......

the java code will be .....

CallableStateme nt function = l_con.prepareCa ll("{call PIM_TEST(?,?)}" );
function.setDat e(1,new Date(5000));
function.regist erOutParameter( 2,Types.DATE)
function.execut eQuery();

..... a good solution ever i have had .....
Mar 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1655
by: Chetan | last post by:
Hi We have Oracle 8.1.7.4 and using .net framework 1.1 with Microsoft client. While executting the stored procedure we are getting an error message. Here is our code. here is the code that executes the Stored procedure. Dim connstr As String Dim conn As OracleConnection Dim comm As New OracleCommand
4
7238
by: Roger Redford | last post by:
Dear Experts, I'm attempting to marry a system to an Oracle 817 datbase. Oracle is my specialty, the back end mainly, so I don't know much about java or javascript. The system uses javascript to make ODBC calls to the db. The particular system I'm working with, will not work with an Oracle stored procedure I'm told. However, it
1
4549
by: Mullin Yu | last post by:
hi, i'm using System.Data.OracleClient; but it seems not having Varchar2 and i use Varchar instead. Then when i call a Oracle Procedure update a table with varchar2, i got the following error: ============== Error Message ==============
12
9526
by: Newbie | last post by:
how can i call an oracle function to get data without using a select statement or stored procedures? given a project_no, i need to call the function: ops$sqltime.pa_new_job_no_fn which will return the next job_no thanks in advance.
2
14768
by: John | last post by:
My application needs to call Oracle function using oracle client 9.2. The oracle function returns boolean value from its returned parameter. The name space that I used is system.data.oracleclient. found out there is no boolean type in Oracle parameter in OracleType. How can I get the returned value from function call in my code? Thanks in advance
2
4923
by: ssp | last post by:
Hello there, I am trying to do very simple thing in trying to return results from an Oracle (10g) Stored Procedure using the Enterprise Library June 2005 Version. The stored procedure first: ============================================ CREATE OR REPLACE PROCEDURE AGENCYSELECTALL(p_cursor OUT SelectPackage.SelectCursor)
0
1673
by: cetram | last post by:
Hello! I'm trying to fix an appliaction created using ColdFusion MX and Oracle 9i. The application worked fine until our IT department reinstalled the oracle server. As far as I've been able to see. The CF application calls to a stored procedure in a package on the Oracle server. However, when the CF application attempts invoce the stored procedure, I get the following error message: PLS-00306 wrong number or types of arguments in call...
2
9420
dmjpro
by: dmjpro | last post by:
this is my funciton block in oracle ....... Function PIM_TEST ( param1 IN DATE DEFAULT SYSDATE, param2 IN OUT DATE) RETURN DATE IS -- -- To modify this template, edit file FUNC.TXT in TEMPLATE -- directory of SQL Navigator --
3
4121
by: =?Utf-8?B?Vmlua2k=?= | last post by:
Hello Everyone, I am trying to call a oracle stored proc from .net code and I am getting an error PLS-00306: wrong number or types of arguments in call to KSSP_MEMBER_NEW. I counted all the number of parameters that I am passing and they seem to be ok, but type can be the problem. In oracle stored proc , the type is defined as for example: dayPhone IN MEMBERTable.DayPhone%type In my ocde I am definig day phone as DbType.string...
0
8604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8862
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7729
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6521
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.