• 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Db2 invalid column name error

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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
  • 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???
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!