# Consult BD oracle

**URL:** <https://www.ruby-forum.com/t/consult-bd-oracle/160655>\
**Category:** Rails\
**Created:** [February 18, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655 "2009-02-18T14:53:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![enocmontero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9e8a1a/32.png) [@enocmontero](https://www.ruby-forum.com/u/enocmontero)\
**Post date:** [February 18, 2009, 2:53pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655/1 "2009-02-18T14:53:04Z")

</div>

hello everyone, the problem is the following application and made his  
and it works very well with mSQL, but I need to consult a table that is  
in  
oracle, then add to consult the same table in a field  
different and Oracle made this just can not show on  
my view is the field that I need to say that the data already inside …  
and conultado  
ROR several tutorials and books and could not solve …

thanks in advance.

---

<div class="post-metadata">

**Author:** ![enocmontero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9e8a1a/32.png) [@enocmontero](https://www.ruby-forum.com/u/enocmontero)\
**Post date:** [February 18, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655/2 "2009-02-18T16:47:33Z")

</div>

I’m not sure I understand:

You’re using MySQL.  
You want to read a value from a field in an Oracle database.  
You want to put that value into a different field on the same Oracle  
table?  
You want to display the result in a view?

Is this correct?

On Feb 18, 8:53 am, Enoc M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![enocmontero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9e8a1a/32.png) [@enocmontero](https://www.ruby-forum.com/u/enocmontero)\
**Post date:** [February 19, 2009, 3:01pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655/3 "2009-02-19T15:01:29Z")

</div>

correct!  
This is the model for q Cree consultation:

class Re\_tmtinv \<ActiveRecord:: Base

```
establish_connection (
    : adapter => "oracle"
    : host => "localhost"
    : username => "root",
    : password => " *****",
    : database => " *****"
    )

```

# Validations

validates\_uniqueness\_of: mtin\_mtin,: message =\> "The code that this  
trying to view does not exist in the system. "

```
  end

```

but still can not get the view mostralo q e created.

perhaps a problem in my view.

Thanks for the help.  
Greetings.

---

<div class="post-metadata">

**Author:** ![enocmontero](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/9e8a1a/32.png) [@enocmontero](https://www.ruby-forum.com/u/enocmontero)\
**Post date:** [February 24, 2009, 4:37pm UTC](https://www.ruby-forum.com/t/consult-bd-oracle/160655/4 "2009-02-24T16:37:02Z")

</div>

Wait, by “view” do you mean an Oracle view (like a table) or a Rails  
view (like an erb template)

On Feb 19, 9:01 am, Enoc M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
