Re: Q: ROWNUM in Forms 4.0 ?

From: Clive Bostock <clive_at_shimmer.demon.co.uk>
Date: 1996/02/10
Message-ID: <s7lL8DALPLHxEwTx_at_shimmer.demon.co.uk>#1/1


In article <4f8q42$dl_at_gossamer.itmel.bhp.com.au>, Lee Levy <levy.lee.ls_at_bhp.com.au> writes
>In article <petersen.823529443_at_com1.dwhl.de>, petersen_at_com1.dwhl.de (Helge
>Petersen) says:
><snip>>Hi Clive,
>>
>>I know that I can't update (or insert) a ROWNUM.
>>
>>What I want is to show (select) the ROWNUM in a multi record block and
>>avoid Forms from automatically generating UPDATE table (ROWNUM, ...) when
>>I'm changing and commiting a record.
>>
>>Is this possible ?
>>
>>***************************************************************************
>>Helge Petersen Datenbank- und Systemadministrator
>>Draeger Synematic GmbH D-23558 Luebeck, Germany
>>Tel. 0451/882-4044 Fax -3031 Email petersen_at_dwhl.de
>>***************************************************************************
>>
>>
>I havent tried this, but it should work:
>create a non-base table item in the base block for the row num.
>create a post-query trigger on the block which runs a cursor
>which returns the row number.
>I think this would work... but I now seem to remeber that row number
>cant be returned in some versions of SQL (very vague memory)
>Umm.
>Oh well, worth a try at this stage?
>
>HIH
>Lee
>------/\/\------+---------------------------------------------------
> / / /\ | Lee Levy, ISSD Systems Development, Del Code (34)
> / / / \ | BHP Information Technology, ACN 006 476 213
> / / / /\ \ | PO Box 261, Warrawong, NSW 2502, Australia
> \ \/ / / / | PH: +61 42 75-5485 Fax: -5500 Tie: 8855-
> \ / / / | Internet : levy.lee.ls_at_bhp.com.au
>-----\/\/\/-----+---------------------------------------------------
>Opinions expressed are mostly my own, so give me some credit.

I don't think this will work. The only way that I can think of which would work is by coding all the SQL/DML for the block explicitly. You would need to include ROWNUM the select, and omit it in INSERTS/UPDATES.

Unless of course there is some clever feature in Forms 4 that can say don't treat this field as a base table field for INSERTS/UPDATES (which I doubt).

The problem is that if you use a POST-QUERY trigger to get the ROWNUM for a given row, you are issuing a single row query which will always return 1.

Helge you don't say why do you need the rownum, it's not a very meaningful value. Can't you use the record number in the block?

Clive Bostock

All opions expressed are those of my
own and not my employer. Received on Sat Feb 10 1996 - 00:00:00 CET

Original text of this message