# Accessing Oracle Package in models

**URL:** <https://www.ruby-forum.com/t/accessing-oracle-package-in-models/150257>\
**Category:** Rails\
**Created:** [October 6, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/accessing-oracle-package-in-models/150257 "2008-10-06T17:56:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 6, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/accessing-oracle-package-in-models/150257/1 "2008-10-06T17:56:20Z")

</div>

Hi All,

Just wanted to know if we can write models for the Oracle packages.  
Like, if I have an oracle package named “user\_pkg”, and a function  
function\_1 in it, can I have a model under the name “UserPkg” and then  
access the function “function\_1”, in it.

If creating a model is not the right way, how to access those packages  
in the models?

Regards,  
Anand.

---

<div class="post-metadata">

**Author:** ![sanand83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b5ac83/32.png) [@sanand83](https://www.ruby-forum.com/u/sanand83)\
**Post date:** [October 7, 2008, 3:19pm UTC](https://www.ruby-forum.com/t/accessing-oracle-package-in-models/150257/2 "2008-10-07T15:19:04Z")

</div>

Hi,  
Refering to the above example, I was able to create a model named  
user\_pkg.rb (class UserPkg) and I am using a find\_by\_sql command to  
access the function “function\_1”. I am able to get the result, but the  
problem I am facing is that the rails tells that

“DESC user\_pkg” failed; not a table or view.

Just wanted to know if I can tell rails that this model user\_pkg.rb is  
not a table (Without using the BaseWithoutTable plugin)

Please help me in this issue.

Thanks in advance.  
Anand
