You could also try
if (connection instanceof OracleConnection) {...
This should work to determine if you have a connection which supports Oracle
extensions, which is what you are testing for.
Ed
----- Original Message -----
From: "Ebersole, Steven" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 11:29 AM
Subject: RE: determining the database driver in actions
NP. A word of caution... If you are using a container datasource, most of
them wrap the underlying jdbc connections in their own connection
implementations.
Just an FYI, as the driver name may not come out like you expect...
-----Original Message-----
From: Claire Wall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 10:28 AM
To: Struts Users Mailing List
Subject: Re: determining the database driver in actions
cheers Steven!
----- Original Message -----
From: "Ebersole, Steven" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Tuesday, December 23, 2003 4:17 PM
Subject: RE: determining the database driver in actions
connection.getMetadata().getDriverName()...
-----Original Message-----
From: Claire Wall [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 10:14 AM
To: Struts Users Mailing List
Subject: determining the database driver in actions
hi,
is there a way to find out the database driver that is being used in my
struts action classes?
the reason for wanting to be able to do this is that i would like to
structure my class so that, depending upon the driver being used (or
alternatively, type of DataSource) i could either write a Blob to the
database (Oracle) or a BinaryStream (SQLServer or MySQL).
is it possible to find out the DataSource's property's?
cheers
claire
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]