• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [OT] DatabaseMetaData.getProcedureColumns() and You!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >[OT] DatabaseMetaData.getProcedureColumns() and You! (From: PA <email@hidden>)

  • Prev by Date: [OT] DatabaseMetaData.getProcedureColumns() and You!
  • Next by Date: Re: Default values in EOF
  • Previous by thread: [OT] DatabaseMetaData.getProcedureColumns() and You!
  • Next by thread: Re: [OT] DatabaseMetaData.getProcedureColumns() and You!
  • Index(es):
    • Date
    • Thread