PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES - ADO.NET TO ORACLE FUNCTION

PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES - ADO.NET TO ORACLE FUNCTION 

 I have a very simple oracle function I'm trying to call from ado.net. The code works fine for a stored procedure but I get the error

 PLS-00221: is not a procedure or is undefined  when I try to call the function. here's my code:

 I've manually tested both the function and stored procedure and they are both working as expected.

 here's my  vb.net code

Protected Overrides Sub OnLoad(ByVal e As EventArgs)

Dim cnn As OracleConnection

Dim sConnString As String = "Data Source=XXXXXXXXXXXXXXXXXXXXXXXXXXXX"

cnn =

New OracleConnection(sConnString)

Dim cmd As New OracleCommand

With cmd

.CommandType = CommandType.StoredProcedure

.CommandText =

"FN_1"     ' THIS DOES NOT WORK

'.CommandText = "SP_1"    ' THIS WORKS

.CommandTimeout = 0

.Connection = cnn

.Parameters.Add(

New OracleParameter("iprocname", OracleType.VarChar)).Value = "P1"

End With

cnn.Open()

If cnn.State = ConnectionState.Open Then

Response.Write(

"connected")

End If

Dim job As String

'job = cmd.ExecuteScalar().ToString

job = cmd.ExecuteNonQuery().ToString

TextBox1.Text = job

'cmd.ExecuteNonQuery()

cmd.Dispose()

cnn.Close()

End Sub
0
jcnet
1/9/2007 4:58:16 PM
asp.net.oracle 2269 articles. 0 followers. Follow

1 Replies
4468 Views

Similar Articles

[PageSpeed] 10

I figured it out. I needed to specify param direction.
0
jcnet
1/9/2007 11:23:38 PM
Reply:

Similar Artilces:

is there any way to call oracle stored function, not stored procedure using .net?
I am just wondering if I can call oracle stored function instead of stored procedure.Thank in advance! you call a function just like s procedure.except you need to add a parameter for the return value.myparam ... ParameterDirection.ReturnValue;--dweezilSELECT * FROM users WHERE clue = 'yes';Records found: 0...

vb.net function and Oracle procedure to get an Oracle Dataset??
I have similar code (a procedure and function) working perfectly with a sql server data source. I;'m trying to do the same things with Oracle, but have run into the problems.    I'm not an oracle expert, so I'm not sure if producing a cursor is my only and best  option. create or replace package body PK_RETAILER isPROCEDURE sp_Get_Order_History(v_ani IN number,output_cursor out PK_CURSORES.generic_cursor) ASBEGINopen output_cursor forselect o.account_number, p.phone, o.amount, o.name, o.init_datefrom orders ojoin users_phones p on p.account_number...

how to call an oracle stored function/procedure using ODBC.NET
Hi all, I have been trying to call an oracle stored funtion and cannot make it. Can anyone give me a clue. Thanks, Ted Code........ <%@ Page Language="VB" %> <%@ Import Namespace="System" %> <%@ Import Namespace="System.Web" %> <%@ Import Namespace="System.Web.UI" %> <%@ Import Namespace="System.Web.UI.WebControls" %> <%@ Import Namespace="System.Data" %> <%@ Import Namespace="System.Configuration" %> <%@ Import Namespace="Microsoft.Data...

Problem with Oracle Stored Procedures using ODP.NET in VB.NET (VS 2003)
This is the stored procedure,Procedure RetrieveReservations(pProperty In Varchar2,pResHeaderId In Varchar2,pEmail In Varchar2,pPasswd In Varchar2,ResultSet In Out ResCursor);This is the old .asp code (part of it)objConn.ConnectionString = Application("BackEndConnection_ConnectionString")objConn.Open objComm.ActiveConnection = objConn objComm.CommandText = "internet_package.RetrieveReservations"objComm.CommandType = adCmdStoredProc objComm.Parameters.Append objComm.CreateParameter("pProperty", adVarChar , adParamInput, 8, Request.QueryString("propid"))objComm.Parameters.Append objComm.Crea...

Oracle store procedure problem using Powerbuilder and Oracle 8.0.4.0 Net
Powerbuilder version 6.0.00 / 6.5 Build 444 Oracle Net 8.0.4.0 I found there is problem with Oracle store procedure having more than 6 in parameters. I got GPF error on Window 95 and Dr. Watson error on NT. Also, I found it works find in Oracle Net 8.0.3.0. Is this a bug? Is there any new patch for this if it is a bug. Any recommendation about What version Oracle Net or SQL Net should I used for Oracle server version 8.0.4.0 (I don't think I am using any Oracle 8 new features)? Thanks in advance, Sharon Li If you use PB 6.5, you can try the new Oracle 8 driver: ftp...

Oracle stored procedure with .net
Dear all I wrote a following stored procedure and program coding. ------------------------------------------------------------------------------------------ Stored procedure ------------------------------------------------------------------------------------------- create or replace procedure Delete_emp (p_empno  number) is begin     delete from emp      where empno = p_empno; end delete_emp; ---------------------------------------------------------------------------------------------- program coding ---------------------------------...

Oracle stored procedures and functions call
For some time now, I've been trying to execute from a client station stored procedures and functions located on an oracle server (version 7.3) without any success. I tried all the methods that I knew : - First, I did declare the stored procedure (or function) as an external local function but when I tried to put it down in my script, I had the following nasty message : C0031 : Unknow function name !!! Incredible. - All right, let's give it another try. So, I decided to use embedded SQL. Here's the code that I wrote in a script. When I compile it, everything was perf...

External function for Oracle stored procedure
Hi, All, I have a simple Oracle stored procedure with one IN parameter of type varchar2 and it returns number. When I execute it in SQL*Plus, it returns the correct number value, but when I call it from PowerBuilder, it reutrns a bogus number. I use ULong as the external function return type and String as the IN parameter. Can oneone help, please? Thanks! Ben I would suggest not using ulong, but just long. If it doesn't help, show some code. -- Terry Dykstra (TeamSybase) Please state PB / OS / DB versions in your post. MySybase http://my.sybase.com/mysybase Search ...

Using RPCFUNC when calling Oracle Procedures/Functions in Oracle PACKAGES
I have looked at the documentation that I have, and found that RPCFUNC is the recommended option to call remote stored procedures. Does this, however, also work with Oracle packages (functions and procedures within an Oracle package)? I have done the following: 1. Created a user object (uo_transaction) inherited from transaction and had the following on its Decalre Local External Functions: FUNCTION string get_ins_address_zid(string address_type_zid, string address_line1, string address_line2, string address_line3, string brgy_zid) RPCFUNC ALIAS FOR "MAPI_CENTRAL.TBPKG__A...

Passing a .NET collection to a Oracle Stored procedure?
In my ASP.NET page I have a list box.  For each row in the list box, I need to invoke an Oracle SP that inserts some data. How would I go about passing the contents of the list box collection to the Stored procedure so that I can loop through it?   Hi,   If you're using Oracle's ODP.net provider, it allows you to pass PLSQL Associative Arrays, which would be the equivalent of passing an array of strings.    I don't believe Microsoft's ODP has that functionality though so if you're using it you'd probably need to concatenat...

Has anyone used Oracle Stored Procedure Function ?
Hi All I would really appreciate if someone could tell if anyone has used Oracle Stored Procedure Function which returns a value. My first question is - if this functiaonality allowed by the Oracle in PB. I am trying to use an Oracler stored procudure function which returns a value. The pb refuses to declare the following statements, which are meant to do this job : DECLARE sp_security_check PROCEDURE FOR @return = WARPROD.CU_F_SECURITYCHECK @A_USER_ID = :ls_userid, @A_APPLICATION = :ls_appname, @A_KB = :ls_keyboard USING gtr_rdbms; EXECUTE ...

PB10 and Oracle stored procedures, packages and functions
When we use either the 10.0.0 that we got on CD or the downloaded PB 10.0.1 build 5502 MR or the PB10.0.1 build 6044 EBF releases and an Oracle 8.1.7 client, we get the following types of problems: If we use declare, execute and fetch statements to access a stored function the returned value has the right most digit removed. This occurs whether we are returning a Varchar, or number variable type. If we access a stored procedure with several out variables defined. Some of them return correctly but some also have truncated the right most digit. If we access a stored procedure with ...

Invoking Oracle Stored-Procedure from Sybase Stored-Procedure
I have a peculiar design constraint. I need to invoke a Oracle Stored-Procedure pass it 1 parameter and use the result-set returned by the oracle stored procedure in my Sybase stored procedure. In affect I need to invoke a Oracle Stored-Procedure returning a result-set from a Sybase Stored-Procedure. I checked up and found Direct-Connect could be one option where-in I could invoke a rpc. Has any-one tried using Direct-Connect ? Also I remember Sybase also had a product\technology called Omni-Connect which could be used to connect to Oracle database. Is Omni-Connect still ...

Invoking Oracle Stored-Procedure from Sybase Stored-Procedure
I have a peculiar design constraint. I need to invoke a Oracle Stored-Procedure pass it 1 parameter and use the result-set returned by the oracle stored procedure in my Sybase stored procedure. In affect I need to invoke a Oracle Stored-Procedure returning a result-set from a Sybase Stored-Procedure. I checked up and found Direct-Connect could be one option where-in I could invoke a rpc. Has any-one tried using Direct-Connect ? Also I remember Sybase also had a product\technology called Omni-Connect which could be used to connect to Oracle database. Is Omni-Connect still ...

Invoking Oracle Stored-Procedure from Sybase Stored-Procedure
I have a peculiar design constraint. I need to invoke a Oracle Stored-Procedure pass it 1 parameter and use the result-set returned by the oracle stored procedure in my Sybase stored procedure. In affect I need to invoke a Oracle Stored-Procedure returning a result-set from a Sybase Stored-Procedure. I checked up and found Direct-Connect could be one option where-in I could invoke a rpc. Has any-one tried using Direct-Connect ? Also I remember Sybase also had a product\technology called Omni-Connect which could be used to connect to Oracle database. Is Omni-Connect still ...

Web resources about - PLS-00221: is not a procedure or is undefined FUNCTIONS VS. STORED PROCEDURES - ADO.NET TO ORACLE FUNCTION - asp.net.oracle

Resources last updated: 12/28/2015 8:00:35 PM