composite key helper

Avatar
  • updated
  • Completed

I have table with composite foreign key (consists of two attributes) (stupid, byt not my work)

When i edit data in table, i want to have possibility to use helper which shows possible values from master table. It works for single attribute key, but not for double.

Maybe i am stupid, but i think that it worked yesterday and is not working today.

Maybe some change in structure? Or what? Foregin key is ok, because it refuses commit when i enter nonexisting key.

THNX

Avatar
Anonymous

Hello,

Does this mean that by selecting a row from lookup table, several fields of current table should be updated? If so, such feature is not supported now.

Avatar
Martin Kluvanek
table1 (primary): Key = town, street. other fields:default_description...

table2 (secondary): foreignKey = town, street. other fields: LNG,Description .....

I edit datatable2:

in field TOWN i want to have possibility to choose from all possible values of TOWN from table1.town.(only this one field)

It works when i have simple key, but dont works when i have composite key.

I think that day before it worked. Maybe i changed something in FK declaration or so...

It would be great if it can choose both parts of compound key by one selection.

Avatar
Martin Kluvanek

What is the condition for activating foreigh key lookup? Because my foreign key works, but editor does not show lookup values.

Avatar
Anonymous

Do you see links on clicking the chain button at the right of datasource on Design area of the Visual Query Builder?

Avatar
Anonymous
Yes. See pics

Table(MS SQL):

CREATE TABLE [dbo].[ECON$TestProductsTR](
[Brand Code] [varchar](10) NOT NULL,
[Line No_] [int] NOT NULL,
[LNGCode] [varchar](10) NOT NULL,
[DescriptionLNG] [varchar](120) NULL,
[SalesLNG] [varchar](120) NULL,
CONSTRAINT [ECON&TestProductsTR$0] PRIMARY KEY CLUSTERED
(
[Brand Code] ASC,
[Line No_] ASC,
[LNGCode] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[ECON$TestProductsTR] WITH CHECK ADD CONSTRAINT [FK_ECON$TestProductsTR_LNG] FOREIGN KEY([LNGCode])
REFERENCES [dbo].[ECON-TR$Languages] ([LNGCode])
GO
ALTER TABLE [dbo].[ECON$TestProductsTR] CHECK CONSTRAINT [FK_ECON$TestProductsTR_LNG]
GO
ALTER TABLE [dbo].[ECON$TestProductsTR] WITH CHECK ADD CONSTRAINT [FK_ECON$TestProductsTR_TestProducts] FOREIGN KEY([Brand Code], [Line No_])
REFERENCES [dbo].[ECON$TestProducts] ([Brand Code], [Line No_])
GO
ALTER TABLE [dbo].[ECON$TestProductsTR] CHECK CONSTRAINT [FK_ECON$TestProductsTR_TestProducts]

Avatar
Anonymous

Thank you for your feedback. We've added this improvement to our to-do list.