Problems with Relationships in SQL7

From: andytaylor00(at)hotmail(dot)com (Andy Taylor)
To: pgsql-general(at)postgresql(dot)org
Subject: Problems with Relationships in SQL7
Date: 2001-02-03 15:18:07
Message-ID: 3a7c2101.8348335@newshost.tinyonline.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear,
I am trying to design a database in SQL Server ver7, using
relationships between tables so that when I enter data in a particular
field in one table, it will update a related field in another table.
Also apply to deleting & inserting fields.

I have set up the tables & their relationships but cannot seem to get
anything working as it should.

Using Query Analyser, when I try to update a field in the primary
table so that it will automatically update the related field in the
foreign table, I keep getting this error message....

Server: Msg 547, Level 16, State 1, Line 1
UPDATE statement conflicted with COLUMN FOREIGN KEY constraint
'FK_sectable_primtable'. The conflict occurred in database 'TestDB',
table 'primtable', column 'col1'.
The statement has been terminated.

Also....
I know that when you create a table you have to set the ON UPDATE & ON
DELETE to CASCADE....BUT when I try to do this using either CREATE
TABLE or ALTER TABLE (on an existing table) I get this error
message...

[Microsoft][ODBC SQL Server Driver]Syntax error or access violation

I have been reading help menus, Technet, & MSDN for 3 days now to try
& resolve this.....I've done what I want to do in Access successfully.

Can anyone PLEASE HELP??

I would be very grateful for any assistance..
Thanks in Advance
please reply to andytaylor00(at)hotmail(dot)com
Andy Taylor

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Florian Steffen 2001-02-03 15:21:41 Timestamp accuracy
Previous Message Wouter de Vries 2001-02-03 14:56:00 Re: MS Access data to PostgrSQL data