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_c ats
Name Null? Type
----------------------------------------- -------- ------------
INVENTORY_CAT_I D 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_INVENTO RY_CAT2(p_INVEN TORY_CAT2 IN VARCHAR2,
p_MIN_ORDER_QTY 2 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_CAT S_COUNT NUMBER;
BEGIN
SELECT COUNT(*)
INTO v_INVENTORY_CAT S_COUNT
FROM TBL_INVENTORY_C ATS
WHERE INVENTORY_CAT LIKE p_INVENTORY_CAT 2 AND END_DATE IS NULL;
IF v_INVENTORY_CAT S_COUNT = 0 THEN
BEGIN
SELECT SEQ_INVENTORY_C AT_ID.NEXTVAL
INTO p_INVENTORY_CAT _ID2
FROM DUAL;
INSERT INTO TBL_INVENTORY_C ATS
(INVENTORY_CAT_ ID,
INVENTORY_CAT,
MIN_ORDER_QTY,
SESSION_ID,
USER_ID,
LOG_ID,
ITEM_TYPE_ID)
VALUES
(p_INVENTORY_CA T_ID2,
p_INVENTORY_CAT 2,
p_MIN_ORDER_QTY 2,
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_INVENTO RY_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.Ora cleClient
Imports System.Web.UI.W ebControls
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) 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.Connection String = "data source=ORACLE;u ser
id=sts;password =sts2005;"
conn.Open()
'lblConnect.Tex t = "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_INVENT ORY_CAT2"
.CommandType = CommandType.Sto redProcedure
.Parameters.Add ("p_INVENTORY_C AT2", OracleType.VarC har,
30).Value = "Far" 'txtInvCat.Text
.Parameters.Add ("p_MIN_ORDER_Q TY2", OracleType.Numb er, 11).Value
= 20 'CInt(txtMinOrd erQty.Text)
.Parameters.Add ("p_SESSION_ID2 ", OracleType.Numb er, 19).Value =
101
.Parameters.Add ("p_USER_ID2 ", OracleType.Numb er, 19).Value = 102
.Parameters.Add ("p_LOG_ID2" , OracleType.Numb er, 19).Value = 103
.Parameters.Add ("p_ITEM_TYPE_I D2", OracleType.Numb er, 11).Value
= 5 'CInt(ddlItemTy pe.SelectedValu e) 'txtItemTypeID. Text
.Parameters.Add ("p_INVENTORY_C AT_ID2", OracleType.Numb er,
11).Direction = ParameterDirect ion.Output
.ExecuteNonQuer y()
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_INVENT ORY_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.Ora cleClient.Oracl eException: ORA-06550: line
1, column 7: PLS-00306: wrong number or types of arguments in call to
'PRC_ADD_INVENT ORY_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. 0 2748 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 the needed documenatation to
configure inithsodbc.ora,listener.ora,tnsnames.ora and related errors
Here is what it says
ORA-12154:
SQL> select * from all_catalog@demo;
|
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 an AIX server.
Using toad and sqlplusw
Everything working fin connecting to other 8.1.7 Oracle servers on windows
|
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 from another client computer using
Net 8 Configuration.
But congiguration cannot be proceeded because above error .
|
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 name of the entry. If I use any
other name for that entry I get the dreaded ORA-12154. For example:
TNSNAMES.ORA -> INV4II Application -> INV4II :: works fine
TNSNAMES.ORA -> INV4DEV Application -> INV4DEV :: ORA-12154
TNSNAMES.ORA -> INV4DEV...
|
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
| |
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.
I had her send me her tnsnames.ora from her PC. The entry I wanted was
as follows (some letters replaced with xxx for security reasons):
xxxora2_prod2 = (DESCRIPTION=
|
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 dump
Wed Sep 20 12:31:12 2006
Errors in file /u01/app/oracle/admin/sotstest/bdump/sotstest_pmon_643152.trc:
ORA-00600: internal error code, arguments: , , , , , , ,
ORA-27302: failure occurred at: skgslfr
Wed Sep 20 12:31:22 2006
Errors...
|
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, I believe another set of eyes on the issue is merited.
I am a MSSQL DBA and somewhat new to ORACLE; but I have read the administrators manual having a basic thorough level of knowledge (Tho' I am still learning) and understanding of how to...
|
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 must be opened with UPGRADE option
Thu Mar 27 09:17:53 2008
Error 704 happened during db open, shutting down database
|
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 issue
Michael Tubuo Ngong
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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...
|
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...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |