This is a MySQL page where it talks about table locking: http://dev.mysql.com/doc/refman/5.0/en/lock-tables.html
Pepe On Mar 2, 9:59 am, Vetrivel Vetrivel <rails-mailing-l...@andreas- s.net> wrote: > Frederick Cheung wrote: > > On 2 Mar 2009, at 10:42, Vetrivel Vetrivel wrote: > > >>> Fred > > >> Please give me some examples to accomplish the table level lock. > > > That depends on your database. ActiveRecord::Base.connection.execute > > allows you to execute arbitrary sql statements. > > > Fred > > I have a two tables a and b . At first I am fetching one records from > a.Then I have to use table lock to lock that table. Then I will do some > operatins,Then I insert a record in b table.Then I will remove the > lock.Untill such times other rails application should not read the data > from a table.How to do this using ActiveRecord::Base class , Say Sql > Query to do that. > > thanks, > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

