Re: 4GL Update is updating ALL rows, Help!
Posted in 1994
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
In article <Co9BsK.JBu@vcd.hp.com>, joana@vcd.hp.com (Joan Armstrong) writes:
|> Specifics: I4GL 4.11 with Online 5.01 on an HP9000 S755 and HP-UX 9.01
|>
|> Horrible error, narrowed down to the possible scenario of:
|> a cursor is declared for update, and one row is retrieved. When
|> the current row is updated, ALL existing rows in the database are
|> updated with the same data. *Not* just the row(s) retrieved into
|> the cursor. The code is not inside a loop. This has happened 3
|> time that we are aware of in the last 2 weeks, and is not repeatable
|> (yet).
|>
|> Has anyone seen anything even remotely like this?
|>
|> Informix has no bugs or cases resembling this.
|>
|> Any ideas or comments will be appreciated.
|>
|> --Joana
|>
|> --
|> Joan Armstrong
|> CIM Engineering, Hewlett Packard, Vancouver
|> Internet: joana@vcd.hp.com
|> HPDesk: Joan Armstrong /HP5400/AL
I have found funny things happening when I do an update of data being selected using a cursor, unless I:
DECLARE a_curs CURSOR FOR
SELECT *
FROM a_table
WHERE column1 = 99 {a value}
FOR UPDATE
FOREACH a_curs INTO p_table.*
UPDATE a_table
SET column7 = 10
WHERE CURRENT OF a_curs
END FOREACH
--
Mark J. Twomey, |
Motorola B.V. | m___
Swords, | @=" )~~ Pig Out !
County Dublin, | W W
Ireland, |
Europe. email at mjt@email.mot.com +----------------------------------