search for: sql_statement

Displaying 5 results from an estimated 5 matches for "sql_statement".

2009 Feb 08
8
How to upload data using huge .sql file
Hi, I am using Ruby - 1.8.6 and Rails- 1.2.6. When I trying to upload data using the .sql file through my code I got "Mysql::Error: Lost connection to MySQL server during query: rollback;" File size is 6 MB. The code I have used is like: numberOfRecord = ActiveRecord::Base.connection.update(File.open(fileName).read) Please let me know how I upload data using huge .sql file. If
2018 Aug 16
1
Thanks for help with validspamobject
Hi, Thanks for all your help. The problem with an error involving validspamobject() has been resolved, as a new version of spdep (0.7-7) was just released and it seems to have stopped using the deprecated function. Ron B. [[alternative HTML version deleted]]
2008 Dec 13
2
how to import a dump .sql file in a rake task
I have a dump of some tables to be filled when the app is setup ''.../db/dataset/regions_dpt_cities_codes.sql'' I would like to execute a task similar to the >mysql source <dump_file> like : ActiveRecord::Base.connection.execute("source #{path};") (which doesn''t run fine, of course.... is it possible in a rake task ? if yes, any suggestion ?
2018 Mar 14
1
Problem with reading data from an UTF-16 database
...e added the sessionInfo() output from both machines. Any suggestions on how to fix the problem? Best regards, Thierry library(DBI) con <- dbConnect(odbc::odbc(), .connection_string = "Driver=the_drive;Server=our_server;Database=the_database;Trusted_Connection=Yes;") dbGetQuery(con, sql_statement) R version 3.4.2 (2017-09-28) Platform: i386-w64-mingw32/i386 (32-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=Dutch_Belgium.1252 LC_CTYPE=Dutch_Belgium.1252 LC_MONETARY=Dutch_Belgium.1252 LC_NUMERIC=C [5] LC_TIME=Dutch_Belgium.1...
2006 Jul 03
0
Slow bulk insert query
...ingle "INSERT INTO foo(...) VALUES(...) " statement that is approx ~500k The dats itself consists of pairs of integers. If I dump the query string to disk and paste it into the query browser and run it then execution is <1 second. If however I do ActiveRecord::Base.connection.execute sql_statement then it takes 50 odd seconds to run. During this time cpu load is close to nothing. Any ideas on what could be causing this slow down? -- Posted via http://www.ruby-forum.com/.