Eviware Forum

soapUI => soapUI => Topic started by: Manoj on January 09, 2008, 01:44:46 pm



Title: Oracle DB connection
Post by: Manoj on January 09, 2008, 01:44:46 pm
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?


Title: Re: Oracle DB connection
Post by: omatzura on January 09, 2008, 01:50:16 pm
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


Title: Re: Oracle DB connection
Post by: Manoj on January 10, 2008, 07:59:10 am
Hi Ole,

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