Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 How to check constraints AFTER transaction comit

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-12-15 : 07:55:25
Tomek writes "Hi
I have problem with foreigns keys checking before transaction commit;
Ok here is how its look:

autocommit=false;

<some upd id 1 >
<some upd id 2 refers to id 3 > (<-- here is error )
<some upd id 3 >
<some upd id 4 >

commit;

Sow i whant that sql server check foreigns keys AFTER commit now it ends with:
"java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]UPDATE statement conflicted with COLUMN FOREIGN KEY SAME TABLE constraint 'FK_KLIENT_REFERENCE_KLIENT'. The conflict occurred in database 'AdeptProfi', table 'KLIENT', column 'kli_id'."

Is there any way that sql server first make upd and whene i make commit it check if all is ok??

I use sql server 2000 and jdbc (from microsoft)."

snSQL
Master Smack Fu Yak Hacker

1837 Posts

Posted - 2006-12-15 : 10:42:46
See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76404
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-15 : 10:52:28
Is this helpful?
http://sqlteam.com/forums/topic.asp?TOPIC_ID=76404

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-15 : 10:56:02
quote:
Originally posted by snSQL

See http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=76404


snSQL,I opened this topic and searching for the relevent topic and didnt see your reply


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -