Click here to Skip to main content
15,920,508 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
The Two Tables Are
1)
SQL
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Manufacture](
    [M_Id] [int] IDENTITY(1,1) NOT NULL,
    [Mfg_Company] [nvarchar](100) NOT NULL,
PRIMARY KEY CLUSTERED
(
    [Mfg_Company] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO


2)
SQL
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[SUPPLIER_DETAILS](
    [SUPPLIER_ID] [int] IDENTITY(1,1) NOT NULL,
    [SUPPLIER_NAME] [nvarchar](200) NOT NULL,
    [ADRESS] [nvarchar](100) NULL,
    [CITY] [nvarchar](100) NULL,
    [PHNO] [bigint] NULL,
    [MAIL_ID] [nvarchar](200) NULL,
    [WEBSITE] [nvarchar](200) NULL,
    [Mfg_Company] [nvarchar](100) NULL,
PRIMARY KEY CLUSTERED
(
    [SUPPLIER_NAME] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[SUPPLIER_DETAILS]  WITH CHECK ADD FOREIGN KEY([Mfg_Company])
REFERENCES [dbo].[Manufacture] ([Mfg_Company])
GO

I Have shown supplier details table in the gridview when i am clicking on update button of gridview the data of only supplier deatils is changing.i.e. Mfg_Company Value also changes which should be affected in Manfacture Table.
Posted
Updated 14-Jul-14 0:56am
v2
Comments
CHill60 14-Jul-14 7:02am    
What's in the code behind of the update button? How are you updating the tables?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900