Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: What is the precise syntax to call stored procedure?
No,
you have the correct syntax. If you really pay attention to the error
message, it is complaining about the stored procedure you have created. Fix
that and you are good to go.
hth,
cindy
Keith Cutler wrote:
> Jacob,
>
> I believe the correct syntax is:
>
> exec proc1
>
> Keith
>
> "Jacob Nikom" <jnikom_at_angstrommicro.com> wrote in message
> news:39C9191F.9C74D825_at_angstrommicro.com...
> > Hi,
> >
> > I am trying to figure out the precise syntax to call stored procedure
> > suing Java and
> > Oracle database. I was able to create the store procedure using the
> > following snippet
> > and verified it with SQLplus tool:
> >
> > String createProcedure = "CREATE OR REPLACE PROCEDURE PROC1 "+
> > "AS " +
> > "BEGIN " +
> > "INSERT INTO URDB_TEST VALUES " +
> > "( " +
> > "'stored str'," +
> > "111," +
> > "11111," +
> > "111111," +
> > "4.12," +
> > "3.62," +
> > "1 " +
> > "); end";
> >
> > createStatement ();
> > executeUpdate (createProcedure);
> > closeStatement ();
> >
> > To call the stored procedure I used the syntax from Sun's tutorial:
> > prepareCall ("{ CALL PROC1 }");
> > execute();
> >
> > and it always produced error message:
> >
> > SQLException: ORA-06550: line 1, column 7:
> > PLS-00905: object RMA.PROC1 is invalid
> > ORA-06550: line 1, column 7:
> > PL/SQL: Statement ignored
> >
> > SQLState: 65000
> > SQLVendorError: 6550
> >
> > I could not find any specific example how to call the stored procedure
> > for Oracle database and Java. I know that Oracle is different, but how?
> >
> > I would appreciate any help,
> >
> > Jacob Nikom
> >
> >
> >
Received on Wed Sep 20 2000 - 00:00:00 CDT