I'm using 2 database. The first wrote in MySQL and the second in Oracle. If i use the command "SET_TABLE_NAME" to forge the model to use another table, there isn't no error with MySQL, while with Oracle if i ask the view "_Form.rhtml" The compiler tell me "No sequence in SELECT TableName_seq.nextval id from dual"(???). Could someone tell me where is the bug?. Could it be a problem into the oci8 library? Ivan.
on 2006-03-01 14:43
on 2006-03-01 14:45
You need to create an oracle sequence that is named TableName_seq, that should do it. This is how to create a sequence: CREATE SEQUENCE TABLENAME_SEQ INCREMENT BY 1 START WITH 100 Chris
on 2006-03-01 17:11
Thanks Chris, But now the compiler tell me it: invalid column name: INSERT INTO ago.prova_stats (cognome, nome, id, telefono) VALUES('Medda', 'Ivan', :id, 70565611) where ago.prova_stats is the table used by me and that have only the columns 'cognome','nome' and 'telefono'. My table hasn't the column 'id'(???).Why Rails search it? Ivan. Chris wrote: > You need to create an oracle sequence that is named TableName_seq, that > should do it. > > This is how to create a sequence: > > CREATE SEQUENCE TABLENAME_SEQ INCREMENT BY 1 START WITH 100 > > Chris
on 2006-03-01 17:32
Create the column 'id' and you will be ok.
on 2006-03-01 17:56
Ok, Now the compiler search the 'id' column into the table. But tell me it: invalid column name: select * from (select raw_sql_.*, rownum raw_rnum_ from (SELECT * FROM ago.prova_stats WHERE (ago.prova_stats.id = '1.0') ) raw_sql_ where rownum <= 1) where raw_rnum_ > 0 The problem is a bad 'id' type? I say Oracle to ALTER the Prova_stats table,to contain the column 'id' and i give it the 'NUMBER' TYPE. Is it correct? I think no. Chris wrote: > Create the column 'id' and you will be ok.