similar to: datatype problem when using ActiveRecord with Oracle

Displaying 20 results from an estimated 200 matches similar to: "datatype problem when using ActiveRecord with Oracle"

2006 Feb 05
0
Enum patch for Rails
Hello! I''ve modified ActiveRecord a bit to support enum columns. This is tested only with MySQL, and maybe needs some changes for other adapters (if they use another syntax or quoting style). I believe this patch should be tested well, so I haven''t (yet) tried to post it to the official Trac. It is also not solid-as-a-rock when it comes to quoting ENUM values. After
2006 Aug 15
0
ActiveRecord inheritance with types table
I have a Field class: class Field < ActiveRecord::Base belongs_to :field_type end with it''s table: fields: id field_type_id name ordering every field has a type class FieldType < ActiveRecord::Base end stored in the field_types table field_types: id name class_name for each field type, there''s a subclass of Field that do whatever special
2008 Dec 05
1
ActiveRecord Oracle and nvarchar2 or nclob datatype
Hi, I ve got oracle database which exists prior to my rails app... :-( I ve got trouble when I am updating/inserting records of a table which includes nvarchar2 attributes. These have a specific maximum length. I often get an error Value too long for column when doing my inserts/ updates, but in fact that is not the case. I ve taken a look at the generated sql statements.... As far as I know
2007 Oct 08
1
How to get database adapter type programmatically in rails?
Hi,all I am developing a Rails application supporting both Mysql and Oracle. I have to use Native SQL statements some place. While we know the SQL grammar is quite different for Mysql and Oracle, so I have to get database adapter type programmatically in my codes to process different native SQL statements. I haven''t found any document for this situation. After some research, I have found
2008 Jan 04
2
oracle adapter + activerecord sessions do not work
Anyone know what''s up with the activerecord session store when using the oracle adapter in Rails 2.0.2 ? I can set a session variable and can then see it''s actually set using the debugger, but after the request completes the session is empty (the @data member is nil). The session_id is staying the same and the updated_at field is being updated but nothing I put in a session
2012 Feb 09
1
Arial font in eps figures in R
Hi, I am trying to create a graph using Arial font (as required by PLoS One). I have read probably all posts in R-help on this topic, as wells as R-news 2006. The code I have been trying is following: Arial <- Type1Font(family="Arial", metrics=c("ArialMT.afm", "arial-BoldMT.afm", "Arial-ItalicMT.afm",
2005 Aug 17
1
RODBC and sqlColumns
I have a Postgres database that I am connecting to with the Postgres ODBC driver on Windows XP in R 2.1.0. In the database is a database with two schemas (public and X). With RODBC (1.1-4) , I can connect to the database and get the tables with sqlTables(db). I can query tables in the schema with sqlQuery("SELECT * FROM X.test"). However, I can't get the columns in table X.test
2008 Feb 08
2
Determine number of 20ms frames in packet - without decoding
Jean-Marc Valin wrote: > David Hogan wrote: > >> Does anyone know a practical way to determine the number of 20ms speex >> frames in a given speex packet without actually looping on speex_decode* ? >> > > There's no ready-made function for that. You'd have to write a function > that inspects the bits, determines what mode is involved, and jump the
2007 Sep 14
1
script/server with options
I have hacked a script that I found at http://www.koders.com/ruby into a generalized webrick startup script. The script is attached to this post and the help text is reproduced below. "script/server" runs webrick on port 3000 bound to 0.0.0.0. If that is too general then you can pass a specific port using -p= or --port=. "script/server -s" runs webrick in ssl mode and
2007 Aug 03
2
my number column returns boolean values
Hi everyone, I''m working on a new rails project and have to build it on top of a legacy oracle database. I''m trying to figure out how to get the number value from a NUMBER(1) datatype. So far I''m only getting a "true" value for 1 and "false" for any other number. From the console I can print out my object values and can see that there are number
2011 Oct 15
1
Libguestfs & ubuntu 11.10 problems
HI, All. I face problems when try to use libguestfs in new ubuntu 11.10. 1) My current version of libguest (1.12.0, binaries taken from libguestfs site) can't boot vm with new kernel. You can find log of libguest-test-tool in attachment. I try force it to boot 2.6.38-11 kernel instead of 3.0.0-12 (which is default), but get the same result (error) 2) I can't compile libguestfs from
2006 Jul 17
6
DRY? Converting Boolean to Yes/No
I have a database column given as: t.column :change_address, :boolean The user interacts with this using a checkbox, but wants confirmations to read: Change address: Yes In an isolated case something like: @obj.change_address ? ''Yes'' : ''No'' Would work fine but this is peppered throughout scads of forms and boolean fields. The first step I took at DRYing
2010 Sep 02
1
ActiveRecord::ConnectionAdapters::Column value_to_boolean(value) does not return a boolean value.
value_to_boolean(value), does not always return a boolean value, only when true. 150: def value_to_boolean(value) 151: if value.is_a?(String) && value.blank? 152: nil 153: else 154: TRUE_VALUES.include?(value) 155: end 156: end If value is contained in TRUE_VALUES then it returns true(TrueClass). But if value is
2005 Nov 18
6
wrong number of arguments (2 for 1) error message help
All, This is really starting to get me as i can''t figure out why I am getting this error. Here is what is going on. I have a table called items and a item controller. When I add a new item to the items table I am also creating several associated tables. the code for this so that you can follow along is: def create @item = Item.new(params[:item]) # The item belongs to
2006 Feb 19
2
possible rails -> postgresql bug
Hi I have a problem accessing an array field in a Postgresql database. Here is the table definition. View "neil.flashing_codes" Column | Type | Modifiers -------------+-----------------------+----------- code | character varying(10) | description | text | folds | integer[] | View definition: SELECT
2006 Jan 07
0
Bug in rails?
Hi! The last 2 day''s I tried create WebService which get back ActiveRecord object, but it''s always get back error. Today I found why. In Mysql the boolean type is a int(1) alias, but in postgresql the boolean type is boolean(!). When in the database table contain boolean type the AWS going to crazy because it''s can''t recognize it. (It''s say:
2008 Apr 07
0
Haml and View tests
Does Rspec work nicely with Haml for controller integrated view tests? I am getting the following error: =================== ActionView::TemplateError in ''Admin::ListingsController index should get a 200 OK'' undefined method `photo'' for true:TrueClass On line #2 of admin/listings/_listing.html.haml 1: %tr 2: %td.photo= image_tag(listing.photo.url(:thumb),
2008 Feb 20
0
Unicode Support for MS SQL Server
In order to coerce Rails 1.2.x into supporting Unicode values for an attribute in a model, I found I had to do the following: 1) Change the underlying column type from varchar to nvarchar. 2) Prepend any quoted values going into nvarchar columns with a capital-letter-N, e. g. ''unicode'' becomes N''unicode'' In order to accomplish this, I modified
2008 Jun 06
1
Need help with Decryption using blowfish CBC
Hello all, Hoping someone can help me out here. I''ve burned almost a week trying to figure out how to decrypt an image file that has been encrypted using Blowfish CBC. I found some code on the net and have modified as follows: require ''openssl'' require ''digest/sha1'' ivArr = [0x0D, 0x0E, 0x0A, 0x0D, 0x0F, 0x0A, 0x0C, 0x0E ]
2006 Mar 01
3
Form helpers and overloaded methods - help!
Can someone explain why form helpers appear to bypass any model methods I override for fields that are bound to database fields? It would be great if someone could tell me how to force the form field, etc to call the method instead of looking at the database / attributes collection. Let''s say I have a column called ''price'' in my database table "books"