Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Cannot insert record error in form

Re: Cannot insert record error in form

From: Maria J <mjenson43_at_cambridgecollege.edu>
Date: 28 Jul 2004 08:35:25 -0700
Message-ID: <8c2afc9c.0407280735.7aeb6a2f@posting.google.com>


You know, I could do without the snide comment/tone in your answer. I was asking for help, not your tone of "voice".

The error was "Unable to insert record", but if I have the same code in SQLPlus it works, but not through the form in PL/SQL code.

Anyone else have an idea? Helpful suggestions please.

Daniel Morgan <damorgan_at_x.washington.edu> wrote in message news:<1090987726.368898_at_yasure>...
> Maria J wrote:
> > I have a form that uses a query to access a view. I want to take 2
> > fields from that view and post them to a table that is not part of the
> > data block. I have confirmed the variables I have chosen match the
> > format of the table I need to update. Here's the code - I can do this
> > as an anonymous block in SqLPlus but not in the PL/SQL code.
> >
> > If res=alert_button1 then
> > -- Insert information into Wish List Table
> >
> > DECLARE
> > cid number(10):=:customer_id;
> > isbn varchar2(20):=:isbn_no;
> > BEGIN
> > INSERT into tbl_wish_list
> > VALUES(cid,isbn);
> > END;
> > Else
> > -- Return to the search results screen
> > message('We have not added this book.');
> > message(' ');
> > End If;
> >
> > Is it because I am doing this via PL/SQL and not a package? I tried
> > to create the package but have another type of error (I posted
> > earlier)
>
> Well thank you for thinking that providing the error was irrelevant.
> That makes the job of trying to help you so much easier.
>
> The only thing wrong with the block, above, is your formatting:
>
> DECLARE
> <variable declarations here>
> BEGIN
> <code here>
> EXCEPTIONS
> WHEN <here>
> END;
>
> That is not what you wrote.
Received on Wed Jul 28 2004 - 10:35:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US