Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 19th, 2004, 09:18 PM
Authorized User
 
Join Date: Jan 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Err in ShoppingCart.aspx

Hi All

I have a problem from this procedure and cursor

********************************

ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'SHOPPINGCARTLIST' ORA-06550: line 1, column 7: PL/SQL: Statement ignored

********************************
And this is my coding

CREATE OR REPLACE VIEW V_SHOPPINGCARTLIST
(PRD_PRODUCTID,PRD_PRODUCTTITLE,QUANTITY,PRD_UNITP RICE, CARTID ,EXTENEDAMOUNT
)
AS
SELECT TBLPRODUCT.PRD_PRODUCTID,TBLPRODUCT.PRD_PRODUCTTIT LE,
SHOPPINGCART.QUANTITY,
TBLPRODUCT.PRD_UNITPRICE,
SHOPPINGCART.CARTID,
TBLPRODUCT.PRD_UNITPRICE*SHOPPINGCART.QUANTITY
FROM
TBLPRODUCT,SHOPPINGCART
WHERE
TBLPRODUCT.PRD_PRODUCTID=SHOPPINGCART.PRODUCTID
AND
SHOPPINGCART.CARTID=CARTID
ORDER BY
TBLPRODUCT.PRD_PRODUCTTITLE;

*********************************
CREATE OR REPLACE PACKAGE SHOPPINGLIST_PKG AS
TYPE SHOPPINGLIST_CUR IS REF CURSOR
RETURN V_SHOPPINGCARTLIST%ROWTYPE;
END SHOPPINGLIST_PKG;

*********************************
CREATE OR REPLACE PROCEDURE SHOPPINGCARTLIST(I_CARTID IN VARCHAR2, RETURN_CUR OUT SHOPPINGLIST_PKG.SHOPPINGLIST_CUR)
--SHOPPINGLIST_PKG IS PACKAGE NAME AND SHOPPINGLIST IS
--REFERENCE IN PACKAGE

AS
BEGIN
    OPEN RETURN_CUR FOR SELECT * FROM V_SHOPPINGCARTLIST
WHERE CARTID=I_CARTID;
    --MUST SELECT DATA FROM VIEW
END SHOPPINGCARTLIST;

******************************
And I use function GetItem to call Procedure ShoppingCartList

  Public Function GetItems(ByVal cartID As String) As OracleClient.OracleDataReader
            Dim myConnString As String = _
                   "user id=scott;integrated security=False;data source=orcl;password=tiger"
            Dim myConnection As New OracleConnection(myConnString)

            ' Create Instance of Connection and Command Object
            Dim myCommand As OracleCommand = New OracleCommand("ShoppingCartList", myConnection)

            ' Mark the Command as a SPROC
            myCommand.CommandType = CommandType.StoredProcedure

            ' Add Parameters to SPROC
            Dim parameterCartID As OracleParameter = New OracleParameter("I_CartID", OracleType.VarChar, 10)
            parameterCartID.Value = cartID
            myCommand.Parameters.Add(parameterCartID)

            ' Execute the command
            myConnection.Open()
            Dim result As OracleDataReader = myCommand.ExecuteReader(CommandBehavior.CloseConne ction)

            ' Return the datareader result
            Return result

        End Function
********************************
Both parameters in function GetItems and procedure are VarChar ,Why does it still show error?

Blueman137







Similar Threads
Thread Thread Starter Forum Replies Last Post
ShoppingCart is not a member of ProfileCommon sstuber BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 May 21st, 2008 04:55 PM
ShoppingCart.aspx.cs - System.FormatException ??? kalel_4444 BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 16th, 2008 01:00 AM
ShoppingCart: SerializeAs XML watxu BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 October 2nd, 2007 03:04 PM
how to use shoppingcart without profile? hertendreef ASP.NET 2.0 Basics 6 January 11th, 2007 05:16 AM
ShoppingCart problem collie VB.NET 2002/2003 Basics 0 September 8th, 2004 07:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.