By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,334 Members | 2,746 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,334 IT Pros & Developers. It's quick & easy.

HOW TO Use transaction control statements inside a sored procedure

gauravgmbhr
100+
P: 107
hi
i am having problem using transactions inside a function
i have to insert records in two tables which have interdependent foreign keys.

so the insertion should be done inside a transaction
and i need to use a single stored procedure to do that.

SO can someone help me by telling me how to use transactions inside a function
or f possible kindly email to gaurav.gambhir.er@gmail.com
Feb 24 '07 #1
Share this Question
Share on Google+
2 Replies


Expert 100+
P: 534
What code did you write so far?
If you just about to start you may want to review these pages first:

Functions

Transactions
Feb 26 '07 #2

gauravgmbhr
100+
P: 107
thanx for the help
but still the questions remain the same
How to begin the transaction inside a function

i need two insert statements inside the function.
the two insert statements cannot execute without a transaction
because they have inter Dependant foreign keys i.e table1 has a foreign key-->table2, and table2 has foreign key--->table1
Mar 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.