Hi All.
I have a tabbed delimited text file which I would like to load via
ActiveRecord::Base.connection.execute("LOAD DATA LOCAL INFILE...")
However, I get the following error message:
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/
active_record/connection_adapters/abstract_adapter.rb:120:
in `log'': Mysql::Error: #42000The used command is not allowed with this
MySQL version:
LOAD DATA LOCAL INFILE ''C:/Rails/music/app/songs.txt'' INTO
TABLE
music.songs; (ActiveRecord::StatementInvalid)
I assume that since LOAD DATA LOCAL has security issues, the default
setting must disable that statement.
I have tried it without "LOCAL", but I get "out of range
value" errors,
which I would like to ignore. (This occurs at an autoincremented column
for which I used "\n", per MySQL manual)
My question is this: How can I execute a "LOAD DATA LOCAL "
statement?
An alternate question is "How can I avoid out of range error?"
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---