Home » Developer & Programmer » Forms » Problem on insert using a rowtype variable (Pl-Sql/ Forms 6i)
Problem on insert using a rowtype variable [message #309721] Fri, 28 March 2008 10:13 Go to next message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Hi experts:

Well, this is my situation:
I'm currently working with Oracle Forms 6i and in my form i select the current information of a given user, let's say the user with ID 16. I do it using a rowtype variable named rt_info, it looks like this:
SELECT * INTO rt_info FROM users WHERE ID = 16;

Then i change some values for example the city, and I asign a new number of ID. It looks like this
rt_info.city := 'NEW YORK';
rt_info.ID := 17;


And then i simply insert the new record
INSERT INTO users VALUES rt_info;


The PROBLEM is that after I insert the new record with the ID number 17, suddenly the record with the ID 16 has sufered changes, It also says NEW york in the field city, but I never executed any update statement.

Anybody has an idea of why is this happening?
Thanks in advance.
Regards!
Re: Problem on insert using a rowtype variable [message #310962 is a reply to message #309721] Wed, 02 April 2008 23:59 Go to previous messageGo to next message
rajatratewal
Messages: 507
Registered: March 2008
Location: INDIA
Senior Member
Please post your complete code with table structure
Re: Problem on insert using a rowtype variable [message #310966 is a reply to message #309721] Thu, 03 April 2008 00:02 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
Anybody has an idea of why is this happening?

There was NEW-YORK before in id 16.

Regards
Michel
Re: Problem on insert using a rowtype variable [message #311130 is a reply to message #310966] Thu, 03 April 2008 09:04 Go to previous message
solisdeveloper
Messages: 48
Registered: March 2008
Location: Mexico
Member
Thank you guys but I have already solved it. It was a problem with FORMS related to the nature of the data block I was working on.

Thanks anyway!
Previous Topic: Conversion of Oracle 6i to Oracle 10g
Next Topic: how to enable/disable button through coding
Goto Forum:
  


Current Time: Sat Dec 10 01:18:58 CST 2016

Total time taken to generate the page: 0.08496 seconds