Subject | Re: [IBO] Two editable and indexed columns from two tables |
---|---|
Author | Raymond Kennington |
Post date | 2002-12-25T06:27:30Z |
"Gerard J.M.Houtenbos" wrote:
There are 2 major problems here, one with the GSG and the other with IBObjects.
1. This is because IBObjects Gettging Started Guide indicates that one should
use a singleton select for the looked-up item rather than a join, so to start
with, use a JOIN to get the looked-up item.
Let the SELECT statement be
SELECT A.ID, A.Name, B.Name as CaptainName
FROM A JOIN B on (B.ID = A.BID)
2. The Create button on the OrderingLinks page incorrectly produces:
CaptainName=CaptainName; CaptainName DESC
and
CaptainName=Item=1
whereas it should have produced
CaptainName=B.Name; B.Name DESC
and
CaptainName=Item=1
The documentation and tool are letting us down here and that makes it very,
very, very difficult and frustrating.
--
Raymond Kennington
Programming Solutions
W2W Team B
>It's taken me 5 hours to work out how to do this.
> Does the fact that knowbody has followed this thread, mean that
> it is not possible?
>
> Gerard
>
> On Wed, 18 Dec 2002 20:14:48 +0100, you wrote:
>
> >I do have two tables in an Interbase 6 database accessed by
> >IB-Objects:
> >
> >Players
> >P_Key: Integer;
> >Name: String;
> >CaptainKey: Integer;
> >
> >Captains
> >P_Key: Integer;
> >Name: String;
> >
> >I use a TwwDbGrid in which I need two columns:
> >Players.Name
> >Captains.Name
> >
> >There are three necessities:
> >1. The Players.Name must be editable.
> >2. The Captains.Name must be selectable from a LookUpCombo
> >3. The grid must be indexed on either column by means of the
> >TitleButtonClick-method.
> >
> >I tried a join-TIBOquery, but then the Captains.Name isn't
> >editable.
> >
> >I tried to use a TIBOquery with a lookupfield for the
> >Captains.Name, but then I can't index on the Captains.Name using
> >OrderingItems.
There are 2 major problems here, one with the GSG and the other with IBObjects.
1. This is because IBObjects Gettging Started Guide indicates that one should
use a singleton select for the looked-up item rather than a join, so to start
with, use a JOIN to get the looked-up item.
Let the SELECT statement be
SELECT A.ID, A.Name, B.Name as CaptainName
FROM A JOIN B on (B.ID = A.BID)
2. The Create button on the OrderingLinks page incorrectly produces:
CaptainName=CaptainName; CaptainName DESC
and
CaptainName=Item=1
whereas it should have produced
CaptainName=B.Name; B.Name DESC
and
CaptainName=Item=1
The documentation and tool are letting us down here and that makes it very,
very, very difficult and frustrating.
--
Raymond Kennington
Programming Solutions
W2W Team B