View field name change !!!

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply

View field name change !!!

Post by Franco » Wed 23 Mar 2005 14:59

I have a big trouble:
. I have a view that return a field named ID_MYFIELDS_1
. this field is a FK in the original table and the PK of the lookupped table is called ID_MYFIELDS
. When a create all the fields in the MS query my fields ID_MYFIELDS_1 is renamed ID_MYFIELDS_1_1

Is there some settings I must change to prevent this behaviour?
Someone else has seen some like this?

Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Thu 24 Mar 2005 09:41

It is a standard behaviour of VCL for cases when the query has several fields with the same name. As a rule these fields hold the same information so usually one of them doesn't displayed. Probably, Field.Origin property will be useful for you.

Post Reply