Subject | Re: [IBO] Live Result Set with Join? |
---|---|
Author | Helen Borrie |
Post date | 2000-12-07T15:23:23Z |
At 10:03 AM 07-12-00 -0500, you wrote:
Select mc.MCatID, mi.MItemID, mc.MCatName, mi.MItemCode,
mi.MItemName, mi.Price, mi.Sales
From MCat mc
JOIN MItem mi
ON mc.MCatID = mi.MCatID
Order by mc.MCatName, mi.MItemCode
and set MItem as the KeyRelation
Then put an update statement for MItem in the EditSQL property of the dataset.
You can only update one side of a joined dataset.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Hi All,Yes, use explicit join syntax, viz
>
>I'm using a TIBOQuery and requesting a live result set. My query is a very
>simple join:
>
>Select mc.MCatID, mi.MItemID, mc.MCatName, mi.MItemCode,
>mi.MItemName, mi.Price, mi.Sales
> >From MCat mc, MItem mi
>Where mc.MCatID = mi.MCatID
>Order by mc.MCatName, mi.MItemCode
>
>I'm then trying to edit the sales field and I get an error that I can't edit
>this field. Is there a restriction on getting a live result set with a
>join? Is there a way to structure my query to further reduce ambiguity if
>this is the problem?
Select mc.MCatID, mi.MItemID, mc.MCatName, mi.MItemCode,
mi.MItemName, mi.Price, mi.Sales
From MCat mc
JOIN MItem mi
ON mc.MCatID = mi.MCatID
Order by mc.MCatName, mi.MItemCode
and set MItem as the KeyRelation
Then put an update statement for MItem in the EditSQL property of the dataset.
You can only update one side of a joined dataset.
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________