using scroll cursor active set in multiuser
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi All, Hi all, my name is jenny . I am working for a company that uses Informix Datablade module. and informix dynamic 4gl tool, I am new to this module. I need to know how to reflect the row has been change (some one has been change) when i am still use scroll cursor active set thanks
samfs wrote: > > Hi All, > > Hi all, my name is jenny . I am working for a company that uses Informix > Datablade module. and informix dynamic 4gl tool, I am new to this module. I > need to know how to reflect the row has been change (some one has been > change) when i am still use scroll cursor active set Welcome to the fold Jenny. You could manually re-display the row in a different color or add a formonly field to the form where you can display an indicator based on a flag in your data structure that indicates whether the row has been modified by the user. There is no automatic way to do this, of which I am aware. Art S. Kagel
Art S. Kagel wrote: > > samfs wrote: > > Hi all, my name is jenny . I am working for a company that uses > > Informix Datablade module. and informix dynamic 4gl tool, I am > > new to this module. I need to know how to reflect the row has > > been change (some one has been change) when i am still use > > scroll cursor active set > > Welcome to the fold Jenny. You could manually re-display the row in > a different color or add a formonly field to the form where you can > display an indicator based on a flag in your data structure that > indicates whether the row has been modified by the user. There is no > automatic way to do this, of which I am aware. Art's right, there isn't an automatic way to handle this. However, if you (a) avoid updating primary keys, which is usually a good idea, and (b) make your scroll cursor contain just enough information to identify the primary key of the row (and, if necessary, to sort the data), then each time you display the complete row of data, you do it in two steps: 1. Fetch the primary key info from the scroll cursor. 2. Fetch the rest of the data from the main table. The big advantage of this is that you will always be viewing the current data. It is tempting to use the ROWID as an alternative to the primary key; resist the temptation as long as possible. It's easier to resist if you use serial columns to create simple (single column) primary keys when necessary. Most of my I4GL programs use this technique, or a minor variant on it. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>