Craig Demyanovich wrote: > To bulk-load a database, I'd use the tools provided by the database. > With > mysql, you'd do something like this (assuming that you're logged in to > the > database server): > > $ mysql -u [username] -p [database] < [file] > > For example: > > $ mysql -u craig -p hockey_development < players.sql > > The -p flag will tell mysql to prompt me for a password, since I didn't > include one right after it so I don't have to enter it in plain text. It > doesn't show any progress. When it's done, you'll be back at the command > prompt. > > If for some reason you really need to do this through Rails, I recommend > looking at ar-extensions [ http://continuousthinking.com/tags/arext ] > for > much speedier loading. > > Regards, > Craig
Hi Craig, Thanks for your response. But I want to upload sql file using ROR. I observed that the problem with ruby statement which I have write. numberOfRecord = ActiveRecord::Base.connection.update(File.open(fileName).read) I think the update method has some limitation, that's y I am not able to upload huge sql file. It works fine with small size of sql file if file size is < 900 kb. Thanks Hitesh -- Posted via http://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 -~----------~----~----~----~------~----~------~--~---

