Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solved : Why does PreparedStatement getMetaData returns null

 
Darren Wilkinson
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic