Forum Discussion

Manoj's avatar
Manoj
Contributor
17 years ago

Oracle DB connection

Hi,

Please suggest how to write a groovy to connect to the Oracle database.
and what are the perrequisites for the same.
1- I have the calsses12.zip in the /ext folder.
Is there any class we have to write?

2 Replies

  • omatzura's avatar
    omatzura
    Super Contributor
    Hi,

    try using

    def db = Sql.newInstance('jdbc:oracle:thin:@server:port:database', 'username', 'pw', 'oracle.jdbc.OracleDriver')

    to connect to the database, then you can use Sql related methods as described at http://groovy.codehaus.org/Database+features

    Hope this helps!

    regards,

    /Ole
    eviware.com
  • Hi Ole,

    Thank you so much for the quick reply.
    Really appriciate the quick support.