For maximum portability with forward only result sets, values should be retrieved from left to right, and column values should be read only once. With scrollable result sets, however, there are no such restrictions.
Does this mean we cant read column value more than once from FORWARD_ONLY ResultSet?
I don't think so. Resultset is nothing but a cursor to your dataset at database layer. As long as you are on that row, you should be able to read that particular column multiple times, but once you moved to next, you can not go back if its FORWARD_ONLY.
love your job and not your company;
...because you never know when your company will stop loving you!
I wonder about this. You can retrieve column data by column number, but you can also retrieve (as their examples show) by column name. We did a lot of that under Oracle 8 and I don't recall ever having to specify named-based retrieval in the order of the column numbers. And, in, fact, being forced to do so would remove one of the primary advantages of name-based retrieval: independence of the table's column ordering.
Unless you've got really wide columns, it would generally make more sense for the entire row to be retrieved and cached at once, so I'd expect column-ordering issues to be mostly a safety precaution.
Customer surveys are for companies who didn't pay proper attention to begin with.
I never had issues with reading columns in a different order than their sequence in the select statement.
But I have had issues when trying to read a column's value twice from a RecordSet. That is the reason why I remembered the quote I posted earlier in this thread.
Unfortunately, that is how far my memory goes. Don't remember database make, version or driver anymore (I'm in my 40s).
The other Rancher that had the same issue doesn't mention what database or driver he used either. I'm going to ask it.
manoj r patil
Joined: Jun 06, 2002
Jan, you have great energy at this age to hook up to ranch and great memory as well!