Hallo, I''m trying to migrate a lot of values from a database (MS Access mdb via odbc) to another mysql database (from which I''ll start to build a RoR based application), using the ruby-odbc library I can access the datas in the mdb file, I would like that some important things, like the ids in the tables, will be the same in the two databases (all the foreign keys are already set in the mdb, so why do I have to compute them again?), table structure will be a bit different, the mysql based one will be more refined than the old software one, but most of the structure could be inherited from the mdb one. Thus I''m looking for a way not to waste all the informations that are already present, a.k.a. the joins already in place (without having to use two ids, the rails one and another field for the referenced one, this looks clumsy to me...). Thank for the answer --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Really none has had this problem? --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Il giorno mar, 30/10/2007 alle 10.45 -0700, Gabriele Tassoni ha scritto:> Really none has had this problem?Probable solution, but it don''t look like so clean, is to use the execute: SomeModel.connection.execute("UPDATE tablename SET id=''3'' WHERE id=''5''") Updating works, now I try with an insert... Bye --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---
Sorry for the "look like" in the previous post.. O_O However the execute("INSERT... works as expected... this is probably the only way. --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---