Página 1 de 1

Lookup fields in another table

Publicado: Dom Sep 23, 2007 11:36 pm
por Mahanimann
Hi,
Still evaluating Xailer, now I wonder about "the best way" to handle this:
In many tables I have many fields with just a number, which relate to a
field in another table. Example: Customer->Postno relate to Postal->Postno.
When skip'ing the table I want to do a Postal->(DbSeek()) and SAY the
Postal->Post_name next to the Customer->Postno GET.
I've tried to handle this by putting code in the TDataSet:OnPostChange
event, and also by making a calculated field which calls a generic function
wich do the SEEK'ing and stuff. (In my first try I have not succeeded in
the calculated field approach, but I know it will work).
How have you guys implemented such linking to lookup fields in other tables?
(I will be using a SQL client/server (MySQL I think), but using
TDataSource/TDataSet that should not be relevant?)
Thanks for any suggestions and replies.
Regards,
Paal

Lookup fields in another table

Publicado: Lun Sep 24, 2007 9:45 am
por ignacio
Dear Sir,
If you are using MySQL make the select statemente so includes all the tables
involved. Take a look at the JOIN command of SQL.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
"Mahanimann" <paaldalen@gmail.com> escribió en el mensaje
news:46f6dc57$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Hi,
>
> Still evaluating Xailer, now I wonder about "the best way" to handle this:
>
> In many tables I have many fields with just a number, which relate to a
> field in another table. Example: Customer->Postno relate to
> Postal->Postno. When skip'ing the table I want to do a Postal->(DbSeek())
> and SAY the Postal->Post_name next to the Customer->Postno GET.
>
> I've tried to handle this by putting code in the TDataSet:OnPostChange
> event, and also by making a calculated field which calls a generic
> function wich do the SEEK'ing and stuff. (In my first try I have not
> succeeded in the calculated field approach, but I know it will work).
>
> How have you guys implemented such linking to lookup fields in other
> tables?
>
> (I will be using a SQL client/server (MySQL I think), but using
> TDataSource/TDataSet that should not be relevant?)
>
> Thanks for any suggestions and replies.
>
> Regards,
> Paal
>

Lookup fields in another table

Publicado: Jue Sep 27, 2007 11:15 pm
por Mahanimann
> If you are using MySQL make the select statemente so includes all the
> tables involved. Take a look at the JOIN command of SQL.
I did, but somehow only got readonly cursors. I know how to do it now :-)
Thanks for the reply,
Paal