Help please - Re: Lookup fields with Edit


2004-02-03 04:30:24 PM
delphi98
"alan" <XXXX@XXXXX.COM>writes:
Quote

Hello,

I have three lookup fields Products name, Category name and Style name. One Product has many Categories and a Category has many Styles. Relevant Product, Category and Style values display correctly on dbGrid.
I need to provide facility to edit Product, Category and Style on dbGrid. I use IBDataSets.When I click Category name on dbGrid (dropdown list) it displays all the categories irrespective of Product and same happens for Style.
I use query as follows on IBcategories and IBStyles components respectively.

select * from CATEGORIES where PRODUCTID = :PRODUCTID
select * from STYLES Where CATEgoryID = :CATEgoryID

What am I doing wrong here?

Thanks