Subject Re: [IBO] TIB_Lookup List Question
Author Jason Wharton

This is a slick way to do it as long as there aren't any other things that
have to be coordinated in, like triggers and changes in other tables to
reflect the current status of things during the transaction. In my case, I
needed the server to be part of the user interactions. I agree that many
cases this is not required which allows you the flexibility to be more
"detached" from the server.

Jason Wharton
CPS - Mesa AZ

----- Original Message -----
From: "Kyle Cordes" <kyle@...>
To: <>
Sent: Monday, October 08, 2001 1:10 PM
Subject: Re: [IBO] TIB_Lookup List Question

> > > I am trying to develop a deposit form. On this form I have two
> > > TIB_Lookup List Boxes with two buttons in between with arrows on
> > > them. I want to be able to populate the box on the left with
> records
> > > marked for deposit. I want the user to be able to select items in
> > > the box and click on the arrow to move them to the box on the right
> From: "Jason Wharton" <jwharton@...>
> > This is a bit of a difficult thing to do using a client/server
> database.
> > Each little move of an item causes the refresh of two datasets which
> can be
> > somewhat inefficient.
> I've done that this way:
> * Use two TListBoxes.
> * Populate them from the database, using the Objects[] to hold a
> reference of some kind to their primary key, original status, etc.
> * Write code to implement the arrows or drag-and-drop between the list
> boxes.
> * In some kind of Save button, start a transaction, loop through the
> list box items, execute SQL to update the database to reflect their new
> status, commit the transaction.
> This uses no refreshes or any other server access until they click Save.
> I think this could be done in a less code-intensive way, but it worked.
> If I had to do it repeatedly, the common code could be factored out. In
> particular, a query dataset (one, not two, still no data-aware controls)
> could be used behind the scenes in cached updates mode, thus moving the
> burden of executing appropriate SQL off of me and on to IBO.
> [ Kyle Cordes * kyle@... * ]
> [ Developer, Consultant, Trainer: Java, Delphi, ASTA, etc.]
> [ Visit the site for articles, links, BDE Alternatives ]
> [ Guide, JBuilder Open Tools, and a Delphi Wiki, and more ]