Originally posted by Peter Tran:
Can you provide more of the code body? A description of the table to which the SQL statement is going against and the actual SQL statement would be helpful.
<A HREF="mailto:anandjoshi@india.com" rel="nofollow">anandjoshi@india.com</A>
Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
Java Rawks
Originally posted by titojermaine:
After a little more research on the web, I was able to solve my issue, but the solution may apply to this issue as well. It seems that we're gonna have to thank the good people of Microshaft for this one. Basically, suppose you have a query like the one listed here:
SELECT col1, col2, col3
FROM table
The exception occurs when you try to access the columns out of the order that they were queried in. That means that if you use one of the get...() functions to retrieve each column, you have to be careful the order you retrieve them in. If you get col2 first, you cannot get col1 any longer, but if you get col1 before you get col2, it will be fine. Basically, just check the order that you are getting the columns in, and make sure that order matches the order in the query.
However, in the example given in this thread, it is selecting * (which might make the ordering confusing, but it's the ordering of the columns in the table at this point), and only one column has been obtained at the time of the exception, so perhaps the solution I suggested here may not be a straightforward solution, but hopefully it'll give you some new ideas.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime. |