Click here to Skip to main content
15,901,283 members
Home / Discussions / Database
   

Database

 
AnswerRe: how to upload sql database on remote database [moved] Pin
Mycroft Holmes24-Sep-10 10:41
professionalMycroft Holmes24-Sep-10 10:41 
QuestionHow to select the row if one column having text field Pin
sr15923-Sep-10 23:22
sr15923-Sep-10 23:22 
AnswerRe: How to select the row if one column having text field Pin
J4amieC24-Sep-10 0:38
J4amieC24-Sep-10 0:38 
QuestionRe: How to select the row if one column having text field (the actual matter i explained inside) Pin
sr15924-Sep-10 0:53
sr15924-Sep-10 0:53 
AnswerRe: How to select the row if one column having text field (the actual matter i explained inside) Pin
J4amieC24-Sep-10 1:21
J4amieC24-Sep-10 1:21 
AnswerRe: How to select the row if one column having text field (the actual matter i explained inside) Pin
David Skelly24-Sep-10 2:02
David Skelly24-Sep-10 2:02 
AnswerRe: How to select the row if one column having text field (the actual matter i explained inside) Pin
Mycroft Holmes24-Sep-10 10:37
professionalMycroft Holmes24-Sep-10 10:37 
QuestionInsert Trigger - Foreign Key Violation - UnCommittable transaction - SQL Server 2005 Pin
Member 246785823-Sep-10 23:19
Member 246785823-Sep-10 23:19 
I am facing an issue in Insert Trigger.

I have 2 tables. Whenever I insert into Table 1, I have written a trigger to insert into Table 2. There is a stored procedure to insert in to Table 1 and there is an After Insert Trigger to insert into Table 2. The table 2 has one primary key and one foreign key.

When there is a Primary Key constraint violation (Or Unique Key), I am able to catch the error in the stored procedure and I am able to display the same to the user.

But if there is a foreign key constraint violation, I am not able to catch the error "Foreign Key Violation". Instead I am getting an error called "UnCommittable transaction".

Is there any way to catch this Foreign Key Violation error and display it to the user?

Note: I have a "Try... Catch" block in the stored procedure. But I don't have it in the Insert Trigger.


Thanks and Regards,

Peri

modified on Friday, September 24, 2010 5:31 AM

QuestionAllocating a new SQL_HANDLE_ENV for every new logical database Pin
coder21k23-Sep-10 5:14
coder21k23-Sep-10 5:14 
Questioninsert multiple rows.. Pin
test-0921-Sep-10 23:09
test-0921-Sep-10 23:09 
AnswerRe: insert multiple rows.. Pin
Goutam Patra21-Sep-10 23:27
professionalGoutam Patra21-Sep-10 23:27 
GeneralRe: insert multiple rows.. Pin
test-0921-Sep-10 23:35
test-0921-Sep-10 23:35 
AnswerRe: insert multiple rows.. Pin
Blue_Boy21-Sep-10 23:38
Blue_Boy21-Sep-10 23:38 
GeneralRe: insert multiple rows.. Pin
test-0921-Sep-10 23:52
test-0921-Sep-10 23:52 
GeneralRe: insert multiple rows.. Pin
Blue_Boy21-Sep-10 23:56
Blue_Boy21-Sep-10 23:56 
GeneralRe: insert multiple rows.. Pin
test-0922-Sep-10 0:11
test-0922-Sep-10 0:11 
GeneralRe: insert multiple rows.. Pin
Blue_Boy22-Sep-10 0:14
Blue_Boy22-Sep-10 0:14 
GeneralRe: insert multiple rows.. Pin
test-0922-Sep-10 0:26
test-0922-Sep-10 0:26 
GeneralRe: insert multiple rows.. Pin
Blue_Boy22-Sep-10 0:29
Blue_Boy22-Sep-10 0:29 
GeneralRe: insert multiple rows.. Pin
test-0922-Sep-10 0:33
test-0922-Sep-10 0:33 
GeneralRe: insert multiple rows.. Pin
Blue_Boy22-Sep-10 0:34
Blue_Boy22-Sep-10 0:34 
GeneralRe: insert multiple rows.. Pin
Mycroft Holmes22-Sep-10 0:48
professionalMycroft Holmes22-Sep-10 0:48 
GeneralRe: insert multiple rows.. Pin
Blue_Boy22-Sep-10 0:52
Blue_Boy22-Sep-10 0:52 
GeneralRe: insert multiple rows.. Pin
Mycroft Holmes22-Sep-10 1:48
professionalMycroft Holmes22-Sep-10 1:48 
GeneralRe: insert multiple rows.. Pin
Mycroft Holmes22-Sep-10 0:50
professionalMycroft Holmes22-Sep-10 0:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.