0

I am attempting to connect a Web Forms project to a pre-existing SQL database and have encountered problems. When I open the table definition, it shows errors relating to the foreign keys. This means I am unable to do any updates (such as deleting columns or adding a primary key). If I do, I get an error such as the following:

Update cannot proceed due to validation errors.  
Please correct the following errors and try again.

SQL71501 :: Foreign Key: [dbo].[FK937B5F0CACA2B2CE] has an unresolved reference to object [dbo].[PROPERTY].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0CACA2B2CE] has an unresolved reference to Column [dbo].[PROPERTY].[PROPERTY_ID].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0C84101219] has an unresolved reference to object [dbo].[PROPERTY_ROOM].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0C84101219] has an unresolved reference to Column [dbo].[PROPERTY_ROOM].[PROPERTY_ROOM_ID].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0C586A8935] has an unresolved reference to object [dbo].[ITEM_TYPE].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0C586A8935] has an unresolved reference to Column [dbo].[ITEM_TYPE].[ITEM_TYPE_ID].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0CFA31E90A] has an unresolved reference to object [dbo].[END_USER].
SQL71501 :: Foreign Key: [dbo].[FK937B5F0CFA31E90A] has an unresolved reference to Column [dbo].[END_USER].[END_USER_ID].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].
SQL71501 :: Permission has an unresolved reference to object [ticket].

This what is in the SQL pane:

CREATE TABLE [dbo].[TICKET] (
    [TICKET_ID]               NUMERIC (19)   IDENTITY (1, 1) NOT NULL,
    [PROPERTY_ID]             NUMERIC (19)   NULL,
    [ITEM_TYPE_ID]            NUMERIC (19)   NULL,
    [ITEM_TYPE_DESCRIPTION]   VARCHAR (64)   NULL,
    [SERIAL_NUMBER]           VARCHAR (128)  NULL,
    [LAST_NOTIFICATION_DATE]  DATETIME       NULL,
    [PARTS_USED]              VARCHAR (256)  NULL,
    [ESTIMATED_HOURS]         NUMERIC (4, 2) NULL,
    [ROOM_NUMBER]             VARCHAR (32)   NULL,
    [PROPERTY_ROOM_ID]        NUMERIC (19)   NULL,
    [PREV_MAINT_FLAG]         CHAR (1)       NULL,
    [ASSIGNED_TO_END_USER_ID] NUMERIC (19)   NULL,
    CONSTRAINT [FK937B5F0CACA2B2CE] FOREIGN KEY ([PROPERTY_ID]) REFERENCES [dbo].[PROPERTY] ([PROPERTY_ID]),
    CONSTRAINT [FK937B5F0C84101219] FOREIGN KEY ([PROPERTY_ROOM_ID]) REFERENCES [dbo].[PROPERTY_ROOM] ([PROPERTY_ROOM_ID]),
    CONSTRAINT [FK937B5F0C586A8935] FOREIGN KEY ([ITEM_TYPE_ID]) REFERENCES [dbo].[ITEM_TYPE] ([ITEM_TYPE_ID]),
    CONSTRAINT [FK937B5F0CFA31E90A] FOREIGN KEY ([ASSIGNED_TO_END_USER_ID]) REFERENCES [dbo].[END_USER] ([END_USER_ID])
);

I read something about adding the master database, so I did add this to my data connections under Server Explorer, but this did not fix it.

I apologize, I am not too familiar with SQL Server, but I have been fighting with this for quite some time and would greatly appreciate any help.

2
  • check this question for answers worked for others Commented Jul 26, 2016 at 16:14
  • 1
    You haven't write permission. Ask DBA to give you write permisins on tables ticket ,PROPERTY, PROPERTY_ROOM, END_USER Commented Jul 26, 2016 at 21:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.