• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Solved : Why does PreparedStatement getMetaData returns null

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I'm puzzled by why the line in my code where I try to get the meta data of a prepared statement returns null, as the API says,

Consequently, it is possible to invoke the method getMetaData on a PreparedStatement object rather than waiting to execute it





Thanks for looking at this for me.
[ July 08, 2008: Message edited by: Darren Wilkinson ]
 
Darren Wilkinson
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's ok, I re-read the API with fresh eyes and noticed its says getMetaData() returns null if the underlying driver cannot return a ResultSetMetaData object.

I'm connecting to a MSSQL database using the jtds driver.

So the null return must be because this driver does cannot return a ResultSetMetaData object.

Thanks for taking a look and sorry for wasting anyones time.
reply
    Bookmark Topic Watch Topic
  • New Topic