• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Solved : Why does PreparedStatement getMetaData returns null

 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!