similar to: How to insert a string content into varbinary column in rails

Displaying 20 results from an estimated 100000 matches similar to: "How to insert a string content into varbinary column in rails"

2009 Feb 26
0
[cdr_odbc] error: Cannot insert the value NULL into column 'calldate'
Hi, I am trying to get * log to mssql server. I have odbc and freetds configured, but my insert query is missing calldate which is a NOT NULL field in database schema. cdr_adaptive_odbc: Insert failed on 'sqlserver:cdr'. CDR failed: INSERT INTO cdr (clid,src,dst,dcontext,channel,lastapp,lastdata,duration,billsec,disposition,amaflags,uniqueid) VALUES
2009 Jun 13
3
How Can I insert another column data into the CSV file when I use FasterCSV?
Hi, All, Suppose I have a CSV file, there is data in it. * Column 1 Column2 Column 3 Column 4 Row1 a b c Row2 a2 b2 c2* You know, the column 4 is no data Now, I would like to insert data to Column 4, after save, the CSV file will be: * Column 1
2008 Jul 19
1
Rails:Using Insert statement in active record?
Hi, I know this would be a simple solution to provide for any one of you. I am new to active record and this is what I have currently done: require ''rubygems'' require ''active_record'' puts "connecting to db...." ActiveRecord::Base.establish_connection( :adapter => "mysql", :host => "localhost", # :username
2007 Jul 30
3
validates_uniqueness_of doesn't work if value tested is numeric and column is string
Hello all, I am working through the depot example in the rails book. If I add a validates_uniqueness_of to a string column in the model, and then try to create a record with a number in this string column I get an SQL error. Looks like the SQL generated to test for uniqueness does not quote the value if it''s numeric even though it''s comparing against a varchar column. It does
2006 Sep 17
0
inserting utf8 value in unique column generates unexpected duplicate key error
I''m inserting the french word for "Hotel" (with a circumflex over the ''o'') into a column that is a unique key on a table. Apparently the insert statement is truncating the string to "H". Additionally, when rails tries to select the french word for "Hotel", the string is not truncated and the inserted record is not returned. Presumably, I
2007 Sep 27
2
How specify size of string column in a migration
I am new to RoR. How do you specify the size of a string column in a migration? The examples I''ve see are all of the form: t.column :name, string which produces a VARCHAR(255). I want a VARCHAR(40). Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2009 Jan 07
0
how rails insert object id to database?
[4;35;1mUser Create (0.5ms) [0m [0mINSERT INTO `users` (`name`, `avatar_file_name`, `avatar_file_size`, `created_at`, `updated_at`, `avatar_content_type`) VALUES(''hello'', ''Screenshot.png'', 253800, ''2009-01-08 08:27:19'', ''2009-01-08 08:27:19'', ''image/png'') [0m [paperclip] Saving attachments. [paperclip]
2007 Aug 24
0
ArgumentError: interning empty string and enum-column plugin
Hello, I am a developer who has just started working on a large scale website in a team of 5 other developers. One of the developers has introduced some enum columns into the the database. Now, by default, active record doesn''t support enum column types but I have added the enum-column plugin into our project. This has worked very well except for a few instances where he
2006 Sep 25
2
How to insert data into a relational database?
Hi. Please do bear with me as I am a newbie. I think I understand how to setup the relation using "has_many" with "through". What I need to know is how to insert data into the tables in the controller. For example, I have company details like name, address and country. I also have a category table like audio, video, events and lighting. Once I setup the relations, I need
2012 Apr 23
2
How to insert filename as column in a file
Hi, I am relatively new to R. Have scourged the help files and the www but havent been able to get a solution. I have around 250 csv files, one file for each date. They have columns of all types, numeric, string etc. The name of each file is the date in the form of 'yyyymmdd'. There is no column within the file which helps me identify the date on which the file was generated, only the
2006 Mar 27
1
file column inserts wrong file url field into database
Hello, ive set up file column like so Controller: def entry @entry = Entry.new(@params[:entry]) if @entry.save flash[:notice] = ''Product was successfully updated.'' else flash[:notice] = ''?'' end end Model: file_column :image View: <%= form_tag({:action=>''entry'', :id=> @entry
2007 Dec 19
0
Rails and SQL Server 2005, NULL String Settings
Has anyone had problems with SQL Server 2005 inserting a " " character into html text fields bound to null strings? What ANSI NULL/Padding settings are people using with rails and SQL Server? Thank You, Kevin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to
2014 May 04
0
Unknown user when sending internal email
I use MySQL to store my virtual users, domains and aliases. My database is setup as follows: |CREATE| |TABLE| |`dovecot_passwords` (| |||`username` ||varchar||(100) ||NOT| |NULL||,| |||`appname` ||varchar||(50) ||NOT| |NULL||,| |||`||password||` varbinary(256) ||NOT| |NULL||,| |||PRIMARY| |KEY| |(`username`,`appname`)| |) I then add a users: | |INSERT| |INTO| |dovecot_passwords (username,
2007 Jan 11
1
Clean sheet, PHP/Java to a Rails core via <insert method>, but secure.
Hi folks, I''ve been working on basic personal rails stuff for a bit now and have reached a point here I have the opportunity to develop something for my job. The basic scenario is this, take a half dozen or more php sites which all have forms; some of which vary, and populate a database. Use that data, re-assemble it and fire it off in xml to a bunch of other companies, grossly over
2006 Feb 01
4
exclude a column in save!
Hi all, I have a column that peeks its value from a sequence (postgres) some times. Other times, I set it to a certain value. This column has a default value of "nextval(''the_sequence'')"... When I want that this column peeks the value from the sequence, I do this: obj = Mymodel.new obj.some_column1 = blah obj.some_column2 = blah obj.some_column3 = blah obj.save! but
2006 Oct 13
5
Insert NULL into MySQL "time" not 00:00:00
Ok I''m not sure what I''m doing wrong, but I have a table that holds a bunch of times, however when I don''t fill in the text box that passes it''s input on to the variables, rails defaults to 00:00:00, which is bad, because that''s midnight. I''m pretty sure I''m doing somethign wrong, and I''m even thinking of using the
2005 Aug 15
0
RE: has_many_belongs_to_many insert issues [CLOSED]
Found the issue. In the association table (categories.products) it is very important to use lowercase column names. I.e, product_id and category_id. I had Product_id and Category_id in SQL.... Gildas -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Cherruel,
2007 May 16
0
how to insert a collection of records into another table
hi all, i have a collection of data, how can i insert to a database table. -- 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
2009 Apr 17
0
Insert Variables into
Hello, I wrote a small application for a temporary employment company so that they can insert the timestamps and also note the companies for which their employees are currently working. Because it is a web app the application is usable from the field and also from the office locations. The contracts have been created by using a very old and unmaintained software that allowed them to fill a
2006 Nov 13
1
Removing column default with a migration
Hi guys, I''m having problems removing the default from a boolean field. I''m using the following statement: change_column :valuations, :too_many_adults, :integer, :null => true but it''s adding DEFAULT ''0'' to the SQL statement. I''m having no luck using change_column_default either. Is this possible? Gareth