• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Invalid Descriptor Index

 
Peter Guillebaud
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am getting an Invalid Descriptor Index error when trying to get the result set from a smalldatetime column in a microsoft sql database with jdbc dbc driver, and displaying this in a jsp page. This happens with ResultSet.getDate() and also with .getInt() ( if I use getMetaData() it describes this column as being of type int). Does anyone know where I am going wrong please?
Thanks
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know much about SQLserver. Try getting it using getString().
Bosun
 
Peter Guillebaud
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks Bosun... I found out that this wasn't the problem. ms-sql insists on getting the variables from the resultset in the same order as they are listed in the SELECT statement and it was this that was causing the problem.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic