Win a copy of Spring Boot in Practice this week in the Spring forum!
  • 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:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Db2 invalid column name error

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
well this is a very simple error message which means that the column name used in the getXXX() method is wrong...I am getting this error when i retrieve data from a db2 database using a store procedure..To my surprise when i used the metedata to get info about the column names i see that the coulmn names are 1,2,3,4... instead of the aliases which i have given for each column in the stored procedure. I went through lot of documention on the web and to my surprise no one has used the column name to retrieve the data from a result set based on column names. Does this mean that db2 jdbc driver does not support retrieval of data based on column name. If it so , then is there any work around for this.
I am using DB2 TYPE 2 Driver and am working on DB2 version 7
Anyone has any idea.
 
Bejoy Nair
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i just read that db2 does not support retrieval of data from resultset based on column names if the query is a static query like stored procedure(strange)...If it is a dynamic sql then one can retrieve data from resultset based on column names....
Any one has any throughts on this???
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic