TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ishwar Patel
NA
2
0
Can I catch exception while deleting Parent Records? Is it Simple?
Dec 15 2009 1:30 PM
I have four tables one parent and three child's. From my application in one form, I want to delete Parent record. As you all know, I can not delete parent record if it is present in any child table.
While I delete parent record, I would like to know whether that record is present in any child table or not? If not present I want to delete that record.
How can I know the record is present in child tables (without actually quering into child tables)?
How can I use SQL exception raised for trying to delete parent record which is present in child tables?
Finally I do not want to let the users delete the parent record without actually going & checking into child tables.
Suggest me most efficient way. The above is just part of my application. Actually there are more than 25 child tables. It will be troublesome to actually check into each and every child table.
Reply
Answers (
0
)
createuserwizard email verification.
Asp .Net