473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

ORA-06550

AKG
Hi,

This is Ali Kazim, Web Application Developer based in Pakistan. I'm
developing a web application using ASP.net having Oracle 9i as database of
choice. I have a developed a stored procedure in Oracle to add a record in
the database table. Here is my schema:

SQL> desc tbl_inventory_cats
Name Null? Type
----------------------------------------- -------- ------------
INVENTORY_CAT_ID NOT NULL NUMBER(11)
INVENTORY_CAT NOT NULL VARCHAR2(30)
MIN_ORDER_QTY NUMBER(11)
START_DATE NOT NULL DATE
END_DATE DATE
SESSION_ID NUMBER(19)
USER_ID NUMBER(19)
LOG_ID NUMBER(19)
ITEM_TYPE_ID NOT NULL NUMBER(11)

PROCEDURE PRC_ADD_INVENTORY_CAT2(p_INVENTORY_CAT2 IN VARCHAR2,
p_MIN_ORDER_QTY2 IN NUMBER,
p_SESSION_ID2 IN NUMBER,
p_USER_ID2 IN NUMBER,
p_LOG_ID2 IN NUMBER,
p_ITEM_TYPE_ID2 IN NUMBER,
p_INVENTORY_CAT_ID2 OUT NUMBER) AS
v_INVENTORY_CATS_COUNT NUMBER;
BEGIN
SELECT COUNT(*)
INTO v_INVENTORY_CATS_COUNT
FROM TBL_INVENTORY_CATS
WHERE INVENTORY_CAT LIKE p_INVENTORY_CAT2 AND END_DATE IS NULL;
IF v_INVENTORY_CATS_COUNT = 0 THEN
BEGIN

SELECT SEQ_INVENTORY_CAT_ID.NEXTVAL
INTO p_INVENTORY_CAT_ID2
FROM DUAL;
INSERT INTO TBL_INVENTORY_CATS
(INVENTORY_CAT_ID,
INVENTORY_CAT,
MIN_ORDER_QTY,
SESSION_ID,
USER_ID,
LOG_ID,
ITEM_TYPE_ID)
VALUES
(p_INVENTORY_CAT_ID2,
p_INVENTORY_CAT2,
p_MIN_ORDER_QTY2,
p_SESSION_ID2,
p_USER_ID2,
p_LOG_ID2,
p_ITEM_TYPE_ID2);
END;
ELSE
p_INVENTORY_CAT_ID2 := 0;
END IF;
END PRC_ADD_INVENTORY_CAT2;

I can execute this within Oracle enviornment successfully. Now I have
created a form in ASP.net and have written the following code in the .vb file
of the .aspx page. Please note I'm using Oracle Client data provedr came in
..net framework 1.1. Excerpt of my .vb file:

Imports System.Data
Imports System.Data.OracleClient
Imports System.Web.UI.WebControls

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
' If Not Page.IsPostBack Then
' End If
End Sub

Private Sub OracleConn()

Try
conn.ConnectionString = "data source=ORACLE;user
id=sts;password=sts2005;"
conn.Open()
'lblConnect.Text = "Connection Succeeded"

Catch ex As OracleException
Response.Write(ex.Message)
'Finally
'If conn.State = ConnectionState.Open Then
' conn.Close()
' End If
'conn.Dispose()
End Try

End Sub
Private Sub AddItem()

'Try
With cmd
.Connection = conn
.CommandText = "PRC_ADD_INVENTORY_CAT2"
.CommandType = CommandType.StoredProcedure
.Parameters.Add("p_INVENTORY_CAT2", OracleType.VarChar,
30).Value = "Far" 'txtInvCat.Text
.Parameters.Add("p_MIN_ORDER_QTY2", OracleType.Number, 11).Value
= 20 'CInt(txtMinOrderQty.Text)
.Parameters.Add("p_SESSION_ID2", OracleType.Number, 19).Value =
101
.Parameters.Add("p_USER_ID2", OracleType.Number, 19).Value = 102
.Parameters.Add("p_LOG_ID2", OracleType.Number, 19).Value = 103
.Parameters.Add("p_ITEM_TYPE_ID2", OracleType.Number, 11).Value
= 5 'CInt(ddlItemType.SelectedValue) 'txtItemTypeID.Text
.Parameters.Add("p_INVENTORY_CAT_ID2", OracleType.Number,
11).Direction = ParameterDirection.Output
.ExecuteNonQuery()
End With

Now when I run the form and try to submit it I get following error:

ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments
in call to 'PRC_ADD_INVENTORY_CAT2' ORA-06550: line 1, column 7: PL/SQL:
Statement ignored
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information about
the error and where it originated in the code.

Exception Details: System.Data.OracleClient.OracleException: ORA-06550: line
1, column 7: PLS-00306: wrong number or types of arguments in call to
'PRC_ADD_INVENTORY_CAT2' ORA-06550: line 1, column 7: PL/SQL: Statement
ignored

I have rechecked the number and types of arguments and they are fine as u
can see from the code above. What seems to be the problem. I've tried looking
for solution over the Internet but couldn't find it. Plz help.

Thanks in advance.

Ali Kazim Gardezi.
Nov 19 '05 #1
0 2735

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Subrahmanyam Arya | last post by:
Dear oracle gurus, I am unable to get past the error ORA-12154: TNS: could not resolve service name on my host when using hsodbc to talk to a remote mysql database. i got from the meta link all...
6
by: John | last post by:
Hi Right password -> ORA-12154: TNS:Could not resolve service name wrong password => ORA-01017: invalid username/password; logon denied Tested on a Windows XP client connecting to Oracle on...
1
by: Park Yeon Jo | last post by:
About Error : ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor I installed Oracle 8.1.7 on Windows XP Professional. and I wanto connect to that server...
1
by: Adam Ruth | last post by:
I'm using OCI on Mac OS X and I've run into a strange problem with my TNSNAMES.ORA file. My TNSNAMES.ORA file has one entry INV4II and it works fine. However, it will only work if that is the...
6
by: bdj | last post by:
Hello! I have at set of tnsnames.ora. I wich to make an union, e.g. a single file of it. How can I do that easy? Greetings Bjørn
4
by: Tig | last post by:
Hi all. I have a need to connect to an Oracle 7.3.3.5 database. I have a user who successfully connects to it with her Oracle 7.3 client. I have an Oracle 9.2 client installed on my machine. ...
2
by: mpatel6 | last post by:
I had this error in alert log and my instance was down, anybody can help me? Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_p004_626740.trc: ORA-07445: exception encountered: core...
5
by: mivey4 | last post by:
Hi, First off, I am aware that this is a very heavily documented error and I have done my homework for throughly researching probable causes before deciding to post my problem here. At this point,...
0
by: basmgokul | last post by:
I am using oracle 10g in windows vista.. when starting DB it throws an error Errors in file c:\database\udump\practice_ora_440.trc: ORA-00704: bootstrap process failure ORA-39700: database...
1
by: michael ngong | last post by:
michael.john@gmx.at (Michael John) wrote in message news:<90cc4edd.0306230900.28075193@posting.google.com>... MIchael I you stated the OS and platform that could make it easier to address your...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
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...

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.