Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Begin... END; gives odd error:
fitzjarrell_at_cox.net wrote:
> erich.keane_at_verizon.net wrote:
> > The server is on my computer, and will never ever be used by anyone but
> > me. These databases will NEVER even get into anything more than that.
> > I am testing an Oracle interface layer, and created it as the System
> > account. When it comes time to actually do something, a DBA will be
> > designing the data structure.
> >
> > It is easier to just run the oracle as system, so that I don't have to
> > deal with other things at the moment.
> >
> > If you look, the table is even named 'test', which should have given a
> > hint.
> >
> > DA Morgan wrote:
> > > erich.keane_at_verizon.net wrote:
> > > > BTW, I forgot to mention, I am executing this through a ODP.Net app.
> > > >
> > > >> You cannot directly perform DDL within a PL/SQL block. Also, WHY is
> > > >> this table owned by SYSTEM? Looking at the ALTER TABLE statements I
> > > >> find:
> > > >
> > > > Table is owned by system for ease at the moment.
> > >
> > > Ease of what? Ease of trashing the system. If you are being paid ... you
> > > are being paid to do a good job. Please reconsider.
> > > --
> > > Daniel A. Morgan
> > > University of Washington
> > > damorgan_at_x.washington.edu
> > > (replace x with u to respond)
> > > Puget Sound Oracle Users Group
> > > www.psoug.org
>
>
>
>
>
>
>
>
>
>> SQL>
> SQL>
>
>> SQL>
> SQL>
>
>> SQL>
> SQL>
>
>> SQL>
> SQL>
>
>> SQL>
> SQL>
>
>
>
Ok, I have agreed that it is a bad idea from the start. I did it because I am lazy! The database is meaningless, and stores Zero data. >From now on, I will store it as a separate user. You win on that. Can we please get to the issue I am having?
My issue still remains, I am attempting to execute through ODP.Net a single event with the database, and am getting errors still. I followed the advice above to try a dynamic query, and am getting the illegal character (ORA-00911) error:
BEGIN
EXECUTE IMMEDIATE 'ALTER TABLE "TESTUSER"."OpenBOXTest" DROP
CONSTRAINT "SYS_C0013604"; ALTER TABLE "OpenBOXTest" DROP COLUMN "ObxTestCol2" ; ALTER TABLE "OpenBOXTest" ADD ("ObxTestCol3" integer DEFAULT 0 );ALTER TABLE "TESTUSER"."OpenBOXTest" ADD "PKConstraint_OBXTest" primary key ("ObxTestCol1" ) ';
I was able to get this to work correctly in MSSql by just combining the different queries with a semicolon, and sending it through the Sql Data Provider. Received on Fri Oct 13 2006 - 08:35:12 CDT