Re: [OT] DatabaseMetaData.getProcedureColumns() and You!
Re: [OT] DatabaseMetaData.getProcedureColumns() and You!
- Subject: Re: [OT] DatabaseMetaData.getProcedureColumns() and You!
- From: Andrus Adamchik <email@hidden>
- Date: Sat, 30 Apr 2005 09:51:37 -0400
Right now, when confronted with the "OTHER", I'm abased to double
check the column TYPE_NAME against information provided by
DatabaseMetaData.getTypeInfo(). This catches most of the
incongruities, but is very much a wacky hack. Sigh...
I don't think there is any better solution. So I wouldn't call it a
hack, rather Oracle driver is a hack ;-).
Andrus
On Apr 30, 2005, at 4:42 AM, PA wrote:
Hello,
This is not specifically related to WebObjects, but... perhaps someone
has run into this issue before...
I have a little class to automagically make stored procedures look
like regular method calls... something along these lines:
Procedure aProcedure = Procedure.procedureWithName( aName, aDataSource
);
Map someResults = aProcedure.call( someParameters );
The procedure parameters information is retrieved using
DatabaseMetaData.getProcedureColumns() to automatically construct the
relevant CallableStatement. Works pretty nicely and without too much
fuss :)
But... some databases (e.g. Oracle) have a pronounced tendency to
return inconsistent column DATA_TYPE... for example,
java.sql.Types.FLOAT masquerading as java.sql.Types.OTHER and other
maddening discrepancies...
Right now, when confronted with the "OTHER", I'm abased to double
check the column TYPE_NAME against information provided by
DatabaseMetaData.getTypeInfo(). This catches most of the
incongruities, but is very much a wacky hack. Sigh...
Anyone else ran into this? Workarounds? Fixes?
TIA!
Cheers
--
PA, Onnay Equitursay
http://alt.textdrive.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden