Oracle FAQ Your Portal to the Oracle Knowledge Grid

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

Re: Cannot insert record error in form

From: Daniel Morgan <>
Date: Wed, 28 Jul 2004 21:22:21 -0700
Message-ID: <1091074973.297116@yasure>

Maria J wrote:

> 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 <> 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
>>> cid number(10):=:customer_id;
>>> isbn varchar2(20):=:isbn_no;
>>> 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
>>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:
>> <variable declarations here>
>> <code here>
>> WHEN <here>
>>That is not what you wrote.

You are welcome write all the bad code you want. I wouldn't want you to correct your error because you inferred a 'tone of voice' from a post in a usenet group ... that would be a horrible thing to do.

PS: The proper thing to have done would have been to just take the advice as it was, and is, valid.

Daniel A. Morgan
University of Washington
(replace 'x' with 'u' to respond)
Received on Wed Jul 28 2004 - 23:22:21 CDT

Original text of this message