Handle the transaction in ActiveRecord::Base

Hi all,

         I am using ActiveRecord for handling the DML operations in

Database. In that I used “create” method for populating the data in
specified table. In activerecord it will build a separate transaction
block for every query. But I want to handle the transaction myself.
Means I want
to execute more than one query in my transaction. How can I do that???

Thanks in advance…

abinila shanthi wrote in post #1014349:

         I am using ActiveRecord for handling the DML operations in

Database. In that I used “create” method for populating the data in
specified table. In activerecord it will build a separate transaction
block for every query. But I want to handle the transaction myself.
Means I want
to execute more than one query in my transaction. How can I do that???

  1. Go to google, enter “activerecord transaction”. The exact answer you
    are looking for is the first hit:
  1. ActiveRecord is a component of Rails, so a Rails mailing list would
    be a better place to post this or similar questions. Ruby is not Rails,
    and vice versa.

Regards,

Brian.