Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Erro calling stored proceedure

Reply
Thread Tools

Erro calling stored proceedure

 
 
Problematic coder
Guest
Posts: n/a
 
      03-13-2007
The intention is to call a stored proceedure which sets flags in the
database, this requires no parameters and the page does not need an
output from the stored proceedure, though is this is necessary I could
change that.

Here is the code I am using:

Dim objcom2 = New Data.OracleClient.OracleCommand
With objcom2
.Connection = objcnn
.CommandTimeout = 60
.CommandType = Data.CommandType.StoredProcedure
.CommandText = "MYPROC"
End With
objcom2.ExecuteNonQuery()


Here is the error I get:

System.Data.OracleClient.OracleException was caught
ErrorCode=-2146232008
Message="ORA-06550: line 1, column 7:
PLS-00201: identifier 'MYPROC' must be declared
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
"
Source="Microsoft.VisualBasic"
StackTrace:
at
Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Method
TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
Flags)
at
Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
BaseReference, String MethodName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
at
Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
Instance, Type Type, String MemberName, Object[] Arguments, String[]
ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
IgnoreReturn)
at internal_processing.btnSubmit_Click(Object sender, EventArgs
e) in C:\Documents and Settings\uid\My Documents\Visual Studio
2005\WebSites\.......:line 350

 
Reply With Quote
 
 
 
 
Lloyd Sheen
Guest
Posts: n/a
 
      03-13-2007

"Problematic coder" <> wrote in message
news: oups.com...
> The intention is to call a stored proceedure which sets flags in the
> database, this requires no parameters and the page does not need an
> output from the stored proceedure, though is this is necessary I could
> change that.
>
> Here is the code I am using:
>
> Dim objcom2 = New Data.OracleClient.OracleCommand
> With objcom2
> .Connection = objcnn
> .CommandTimeout = 60
> .CommandType = Data.CommandType.StoredProcedure
> .CommandText = "MYPROC"
> End With
> objcom2.ExecuteNonQuery()
>
>
> Here is the error I get:
>
> System.Data.OracleClient.OracleException was caught
> ErrorCode=-2146232008
> Message="ORA-06550: line 1, column 7:
> PLS-00201: identifier 'MYPROC' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
> "
> Source="Microsoft.VisualBasic"
> StackTrace:
> at
> Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Method
> TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> Flags)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> BaseReference, String MethodName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> IgnoreReturn)
> at internal_processing.btnSubmit_Click(Object sender, EventArgs
> e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> 2005\WebSites\.......:line 350
>


Perhaps the schema name??

LS

 
Reply With Quote
 
 
 
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 7:03 pm, "Problematic coder" <gnews...@gmail.com> wrote:
> The intention is to call a stored proceedure which sets flags in the
> database, this requires no parameters and the page does not need an
> output from the stored proceedure, though is this is necessary I could
> change that.
>
> Here is the code I am using:
>
> Dim objcom2 = New Data.OracleClient.OracleCommand
> With objcom2
> .Connection = objcnn
> .CommandTimeout = 60
> .CommandType = Data.CommandType.StoredProcedure
> .CommandText = "MYPROC"
> End With
> objcom2.ExecuteNonQuery()
>
> Here is the error I get:
>
> System.Data.OracleClient.OracleException was caught
> ErrorCode=-2146232008
> Message="ORA-06550: line 1, column 7:
> PLS-00201: identifier 'MYPROC' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored



Check if your user can call that procedure

 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      03-13-2007
Problematic coder wrote:
> The intention is to call a stored proceedure which sets flags in the
> database, this requires no parameters and the page does not need an
> output from the stored proceedure, though is this is necessary I could
> change that.
>
> Here is the code I am using:
>
> Dim objcom2 = New Data.OracleClient.OracleCommand
> With objcom2
> .Connection = objcnn
> .CommandTimeout = 60
> .CommandType = Data.CommandType.StoredProcedure
> .CommandText = "MYPROC"
> End With
> objcom2.ExecuteNonQuery()
>
>
> Here is the error I get:
>
> System.Data.OracleClient.OracleException was caught
> ErrorCode=-2146232008
> Message="ORA-06550: line 1, column 7:
> PLS-00201: identifier 'MYPROC' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
> "
> Source="Microsoft.VisualBasic"
> StackTrace:
> at
> Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Method
> TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> Flags)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> BaseReference, String MethodName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> IgnoreReturn)
> at internal_processing.btnSubmit_Click(Object sender, EventArgs
> e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> 2005\WebSites\.......:line 350
>


The name of the stored procedure is not recognised.

Check the spelling. Check that you are connecting to the correct
database. Check that the stored procedure is actually there.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
Problematic coder
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:
> The intention is to call a stored proceedure which sets flags in the
> database, this requires no parameters and the page does not need an
> output from the stored proceedure, though is this is necessary I could
> change that.
>
> Here is the code I am using:
>
> Dim objcom2 = New Data.OracleClient.OracleCommand
> With objcom2
> .Connection = objcnn
> .CommandTimeout = 60
> .CommandType = Data.CommandType.StoredProcedure
> .CommandText = "MYPROC"
> End With
> objcom2.ExecuteNonQuery()
>
> Here is the error I get:
>
> System.Data.OracleClient.OracleException was caught
> ErrorCode=-2146232008
> Message="ORA-06550: line 1, column 7:
> PLS-00201: identifier 'MYPROC' must be declared
> ORA-06550: line 1, column 7:
> PL/SQL: Statement ignored
> "
> Source="Microsoft.VisualBasic"
> StackTrace:
> at
> Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho*d
> TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> Flags)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> BaseReference, String MethodName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> at
> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> IgnoreReturn)
> at internal_processing.btnSubmit_Click(Object sender, EventArgs
> e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> 2005\WebSites\.......:line 350


OK I did overlook granting execute to to the web application userid,
that is now granted but still did not fix the problem.

I still get the exact same error

The connection objcnn is fine because I do inserts with it prior to
attempting to execute this.

The error message seems to make reference to line 1, column 7 - i
assume this is in the stored procedure, here are the first few lines :

CREATE OR REPLACE
PROCEDURE set_status_and_flags
AS
v_something varchar2(9);
v_somethingelse varchar2(3);
BEGIN

It executes fine and does everything expected when exected via Oracle
SQL developer

Another quick test I ran was changing the name of the procedure in the
vb.net call to one I knew did not exist and I still got the same error
except with the incorrect name, so I would say you are on the right
line that it cannot find the procedure but I have no clue why, it is
there!

Thanks

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 9:49 pm, "Problematic coder" <gnews...@gmail.com> wrote:
> On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:
>
>
>
>
>
> > The intention is to call a stored proceedure which sets flags in the
> > database, this requires no parameters and the page does not need an
> > output from the stored proceedure, though is this is necessary I could
> > change that.

>
> > Here is the code I am using:

>
> > Dim objcom2 = New Data.OracleClient.OracleCommand
> > With objcom2
> > .Connection = objcnn
> > .CommandTimeout = 60
> > .CommandType = Data.CommandType.StoredProcedure
> > .CommandText = "MYPROC"
> > End With
> > objcom2.ExecuteNonQuery()

>
> > Here is the error I get:

>
> > System.Data.OracleClient.OracleException was caught
> > ErrorCode=-2146232008
> > Message="ORA-06550: line 1, column 7:
> > PLS-00201: identifier 'MYPROC' must be declared
> > ORA-06550: line 1, column 7:
> > PL/SQL: Statement ignored
> > "
> > Source="Microsoft.VisualBasic"
> > StackTrace:
> > at
> > Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho**d
> > TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> > Flags)
> > at
> > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> > BaseReference, String MethodName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> > InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> > at
> > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > IgnoreReturn)
> > at internal_processing.btnSubmit_Click(Object sender, EventArgs
> > e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> > 2005\WebSites\.......:line 350

>
> OK I did overlook granting execute to to the web application userid,
> that is now granted but still did not fix the problem.
>
> I still get the exact same error
>
> The connection objcnn is fine because I do inserts with it prior to
> attempting to execute this.
>
> The error message seems to make reference to line 1, column 7 - i
> assume this is in the stored procedure, here are the first few lines :
>
> CREATE OR REPLACE
> PROCEDURE set_status_and_flags
> AS
> v_something varchar2(9);
> v_somethingelse varchar2(3);
> BEGIN
>
> It executes fine and does everything expected when exected via Oracle
> SQL developer
>
> Another quick test I ran was changing the name of the procedure in the
> vb.net call to one I knew did not exist and I still got the same error
> except with the incorrect name, so I would say you are on the right
> line that it cannot find the procedure but I have no clue why, it is
> there!
>
> Thanks- Hide quoted text -
>
> - Show quoted text -


Well, I'm not sure but there did you specify the parameters:

v_something varchar2(9);
v_somethingelse varchar2(3);

Can it be the reason?

 
Reply With Quote
 
Problematic coder
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 1:57 pm, "Alexey Smirnov" <alexey.smir...@gmail.com> wrote:
> On Mar 13, 9:49 pm, "Problematic coder" <gnews...@gmail.com> wrote:
>
>
>
>
>
> > On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:

>
> > > The intention is to call a stored proceedure which sets flags in the
> > > database, this requires no parameters and the page does not need an
> > > output from the stored proceedure, though is this is necessary I could
> > > change that.

>
> > > Here is the code I am using:

>
> > > Dim objcom2 = New Data.OracleClient.OracleCommand
> > > With objcom2
> > > .Connection = objcnn
> > > .CommandTimeout = 60
> > > .CommandType = Data.CommandType.StoredProcedure
> > > .CommandText = "MYPROC"
> > > End With
> > > objcom2.ExecuteNonQuery()

>
> > > Here is the error I get:

>
> > > System.Data.OracleClient.OracleException was caught
> > > ErrorCode=-2146232008
> > > Message="ORA-06550: line 1, column 7:
> > > PLS-00201: identifier 'MYPROC' must be declared
> > > ORA-06550: line 1, column 7:
> > > PL/SQL: Statement ignored
> > > "
> > > Source="Microsoft.VisualBasic"
> > > StackTrace:
> > > at
> > > Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho***d
> > > TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> > > Flags)
> > > at
> > > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> > > BaseReference, String MethodName, Object[] Arguments, String[]
> > > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> > > InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> > > at
> > > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> > > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > > IgnoreReturn)
> > > at internal_processing.btnSubmit_Click(Object sender, EventArgs
> > > e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> > > 2005\WebSites\.......:line 350

>
> > OK I did overlook granting execute to to the web application userid,
> > that is now granted but still did not fix the problem.

>
> > I still get the exact same error

>
> > The connection objcnn is fine because I do inserts with it prior to
> > attempting to execute this.

>
> > The error message seems to make reference to line 1, column 7 - i
> > assume this is in the stored procedure, here are the first few lines :

>
> > CREATE OR REPLACE
> > PROCEDURE set_status_and_flags
> > AS
> > v_something varchar2(9);
> > v_somethingelse varchar2(3);
> > BEGIN

>
> > It executes fine and does everything expected when exected via Oracle
> > SQL developer

>
> > Another quick test I ran was changing the name of the procedure in the
> > vb.net call to one I knew did not exist and I still got the same error
> > except with the incorrect name, so I would say you are on the right
> > line that it cannot find the procedure but I have no clue why, it is
> > there!

>
> > Thanks- Hide quoted text -

>
> > - Show quoted text -

>
> Well, I'm not sure but there did you specify the parameters:
>
> v_something varchar2(9);
> v_somethingelse varchar2(3);
>
> Can it be the reason?- Hide quoted text -
>
> - Show quoted text -


Those are variables that get assigned a value further into the PL SQL
like so:

BEGIN
FOR rec IN (SELECT A.THISCOLUMN,
A.THATCOLUMN
FROM MYDATABASE_ADM.MYTABLE A
WHERE
v_something := rec.THISCOLUMN;
v_somethingelse := rec.THATCOLUMN;

etc.

So it is not expecting these values as parameters
If I execute this manually on the database no parameters are required
and it does everything as expected.

I did notice however that if I call an incorrect proceedure name I get
exactly the same error.

 
Reply With Quote
 
Alexey Smirnov
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 10:15 pm, "Problematic coder" <gnews...@gmail.com> wrote:
> On Mar 13, 1:57 pm, "Alexey Smirnov" <alexey.smir...@gmail.com> wrote:
>
>
>
>
>
> > On Mar 13, 9:49 pm, "Problematic coder" <gnews...@gmail.com> wrote:

>
> > > On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:

>
> > > > The intention is to call a stored proceedure which sets flags in the
> > > > database, this requires no parameters and the page does not need an
> > > > output from the stored proceedure, though is this is necessary I could
> > > > change that.

>
> > > > Here is the code I am using:

>
> > > > Dim objcom2 = New Data.OracleClient.OracleCommand
> > > > With objcom2
> > > > .Connection = objcnn
> > > > .CommandTimeout = 60
> > > > .CommandType = Data.CommandType.StoredProcedure
> > > > .CommandText = "MYPROC"
> > > > End With
> > > > objcom2.ExecuteNonQuery()

>
> > > > Here is the error I get:

>
> > > > System.Data.OracleClient.OracleException was caught
> > > > ErrorCode=-2146232008
> > > > Message="ORA-06550: line 1, column 7:
> > > > PLS-00201: identifier 'MYPROC' must be declared
> > > > ORA-06550: line 1, column 7:
> > > > PL/SQL: Statement ignored
> > > > "
> > > > Source="Microsoft.VisualBasic"
> > > > StackTrace:
> > > > at
> > > > Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho****d
> > > > TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> > > > Flags)
> > > > at
> > > > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> > > > BaseReference, String MethodName, Object[] Arguments, String[]
> > > > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> > > > InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> > > > at
> > > > Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> > > > Instance, Type Type, String MemberName, Object[] Arguments, String[]
> > > > ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> > > > IgnoreReturn)
> > > > at internal_processing.btnSubmit_Click(Object sender, EventArgs
> > > > e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> > > > 2005\WebSites\.......:line 350

>
> > > OK I did overlook granting execute to to the web application userid,
> > > that is now granted but still did not fix the problem.

>
> > > I still get the exact same error

>
> > > The connection objcnn is fine because I do inserts with it prior to
> > > attempting to execute this.

>
> > > The error message seems to make reference to line 1, column 7 - i
> > > assume this is in the stored procedure, here are the first few lines :

>
> > > CREATE OR REPLACE
> > > PROCEDURE set_status_and_flags
> > > AS
> > > v_something varchar2(9);
> > > v_somethingelse varchar2(3);
> > > BEGIN

>
> > > It executes fine and does everything expected when exected via Oracle
> > > SQL developer

>
> > > Another quick test I ran was changing the name of the procedure in the
> > > vb.net call to one I knew did not exist and I still got the same error
> > > except with the incorrect name, so I would say you are on the right
> > > line that it cannot find the procedure but I have no clue why, it is
> > > there!

>
> > > Thanks- Hide quoted text -

>
> > > - Show quoted text -

>
> > Well, I'm not sure but there did you specify the parameters:

>
> > v_something varchar2(9);
> > v_somethingelse varchar2(3);

>
> > Can it be the reason?- Hide quoted text -

>
> > - Show quoted text -

>
> Those are variables that get assigned a value further into the PL SQL
> like so:
>
> BEGIN
> FOR rec IN (SELECT A.THISCOLUMN,
> A.THATCOLUMN
> FROM MYDATABASE_ADM.MYTABLE A
> WHERE
> v_something := rec.THISCOLUMN;
> v_somethingelse := rec.THATCOLUMN;
>
> etc.
>
> So it is not expecting these values as parameters
> If I execute this manually on the database no parameters are required
> and it does everything as expected.
>
> I did notice however that if I call an incorrect proceedure name I get
> exactly the same error.- Hide quoted text -
>
> - Show quoted text -


http://www.dbasupport.com/forums/showthread.php?t=37474

 
Reply With Quote
 
=?ISO-8859-1?Q?G=F6ran_Andersson?=
Guest
Posts: n/a
 
      03-13-2007
Problematic coder wrote:
> On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:
>> The intention is to call a stored proceedure which sets flags in the
>> database, this requires no parameters and the page does not need an
>> output from the stored proceedure, though is this is necessary I could
>> change that.
>>
>> Here is the code I am using:
>>
>> Dim objcom2 = New Data.OracleClient.OracleCommand
>> With objcom2
>> .Connection = objcnn
>> .CommandTimeout = 60
>> .CommandType = Data.CommandType.StoredProcedure
>> .CommandText = "MYPROC"
>> End With
>> objcom2.ExecuteNonQuery()
>>
>> Here is the error I get:
>>
>> System.Data.OracleClient.OracleException was caught
>> ErrorCode=-2146232008
>> Message="ORA-06550: line 1, column 7:
>> PLS-00201: identifier 'MYPROC' must be declared
>> ORA-06550: line 1, column 7:
>> PL/SQL: Statement ignored
>> "
>> Source="Microsoft.VisualBasic"
>> StackTrace:
>> at
>> Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho*d
>> TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
>> Flags)
>> at
>> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
>> BaseReference, String MethodName, Object[] Arguments, String[]
>> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
>> InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
>> at
>> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
>> Instance, Type Type, String MemberName, Object[] Arguments, String[]
>> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
>> IgnoreReturn)
>> at internal_processing.btnSubmit_Click(Object sender, EventArgs
>> e) in C:\Documents and Settings\uid\My Documents\Visual Studio
>> 2005\WebSites\.......:line 350

>
> OK I did overlook granting execute to to the web application userid,
> that is now granted but still did not fix the problem.
>
> I still get the exact same error
>
> The connection objcnn is fine because I do inserts with it prior to
> attempting to execute this.
>
> The error message seems to make reference to line 1, column 7 - i
> assume this is in the stored procedure, here are the first few lines :
>
> CREATE OR REPLACE
> PROCEDURE set_status_and_flags
> AS
> v_something varchar2(9);
> v_somethingelse varchar2(3);
> BEGIN
>
> It executes fine and does everything expected when exected via Oracle
> SQL developer
>
> Another quick test I ran was changing the name of the procedure in the
> vb.net call to one I knew did not exist and I still got the same error
> except with the incorrect name, so I would say you are on the right
> line that it cannot find the procedure but I have no clue why, it is
> there!
>
> Thanks
>


You can't execute the stored procedure set_status_and_flags by
specifying "MYPROC" as command text.

--
Göran Andersson
_____
http://www.guffa.com
 
Reply With Quote
 
Problematic coder
Guest
Posts: n/a
 
      03-13-2007
On Mar 13, 3:16 pm, Göran Andersson <g...@guffa.com> wrote:
> Problematic coder wrote:
> > On Mar 13, 11:03 am, "Problematic coder" <gnews...@gmail.com> wrote:
> >> The intention is to call a stored proceedure which sets flags in the
> >> database, this requires no parameters and the page does not need an
> >> output from the stored proceedure, though is this is necessary I could
> >> change that.

>
> >> Here is the code I am using:

>
> >> Dim objcom2 = New Data.OracleClient.OracleCommand
> >> With objcom2
> >> .Connection = objcnn
> >> .CommandTimeout = 60
> >> .CommandType = Data.CommandType.StoredProcedure
> >> .CommandText = "MYPROC"
> >> End With
> >> objcom2.ExecuteNonQuery()

>
> >> Here is the error I get:

>
> >> System.Data.OracleClient.OracleException was caught
> >> ErrorCode=-2146232008
> >> Message="ORA-06550: line 1, column 7:
> >> PLS-00201: identifier 'MYPROC' must be declared
> >> ORA-06550: line 1, column 7:
> >> PL/SQL: Statement ignored
> >> "
> >> Source="Microsoft.VisualBasic"
> >> StackTrace:
> >> at
> >> Microsoft.VisualBasic.CompilerServices.Symbols.Con tainer.InvokeMethod(Metho**d
> >> TargetProcedure, Object[] Arguments, Boolean[] CopyBack, BindingFlags
> >> Flags)
> >> at
> >> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.CallMethod(Container
> >> BaseReference, String MethodName, Object[] Arguments, String[]
> >> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, BindingFlags
> >> InvocationFlags, Boolean ReportErrors, ResolutionFailure& Failure)
> >> at
> >> Microsoft.VisualBasic.CompilerServices.NewLateBind ing.LateCall(Object
> >> Instance, Type Type, String MemberName, Object[] Arguments, String[]
> >> ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack, Boolean
> >> IgnoreReturn)
> >> at internal_processing.btnSubmit_Click(Object sender, EventArgs
> >> e) in C:\Documents and Settings\uid\My Documents\Visual Studio
> >> 2005\WebSites\.......:line 350

>
> > OK I did overlook granting execute to to the web application userid,
> > that is now granted but still did not fix the problem.

>
> > I still get the exact same error

>
> > The connection objcnn is fine because I do inserts with it prior to
> > attempting to execute this.

>
> > The error message seems to make reference to line 1, column 7 - i
> > assume this is in the stored procedure, here are the first few lines :

>
> > CREATE OR REPLACE
> > PROCEDURE set_status_and_flags
> > AS
> > v_something varchar2(9);
> > v_somethingelse varchar2(3);
> > BEGIN

>
> > It executes fine and does everything expected when exected via Oracle
> > SQL developer

>
> > Another quick test I ran was changing the name of the procedure in the
> > vb.net call to one I knew did not exist and I still got the same error
> > except with the incorrect name, so I would say you are on the right
> > line that it cannot find the procedure but I have no clue why, it is
> > there!

>
> > Thanks

>
> You can't execute the stored procedure set_status_and_flags by
> specifying "MYPROC" as command text.
>
> --
> Göran Andersson
> _____http://www.guffa.com- Hide quoted text -
>
> - Show quoted text -


Thanks, though that was deliberately changed for posting publicly,
just forgot the next post.

Anyway I have finally resolved it, everybody was on the right track
especially the first poster, I don't know how I missed it since I do
this all the time:

I forgot to specify mydatabaseusername.myproc and since there was no
alias it could not see it

I was looking for a more complicated answer, oddly it rarely is
whenever you get totally stuck

Thank you everyone for your suggesions, none were inaccurate, I was
just a bit slow running with them
Have a great day!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Return Value From Stored Proceedure. Mick Walker ASP .Net 4 06-20-2007 07:08 PM
calling a proceedure ig.martix@gmail.com ASP General 0 03-23-2007 03:18 AM
Call Oracle Stored Proceedure VB.NET Problematic coder ASP .Net 2 03-09-2007 08:21 PM
Call Oracle Stored Proceedure VB.NET Problematic coder ASP .Net 0 03-08-2007 10:37 PM
Calling on a .net proceedure using javascript on client pmclinn@gmail.com ASP .Net 0 03-31-2005 05:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57