• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with ResultSetMetaData  RSS feed

 
Alejandro Barrero
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

The problem is that there is only one primary key with column "chID", but metadata.getColumnLabel(i + 1) is giving me "GENERATED_KEY" while I am expecting "chID".
 
Dave Tolls
Ranch Foreman
Posts: 3068
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does getColumnName return?

Do you know what SQL is being used?
 
Alejandro Barrero
Ranch Hand
Posts: 376
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using MySQL; getColumnName  gives the same result.
I solved the problem by using a SELECT.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!