Forums Register Login

Getting Column index

+Pie Number of slices to send: Send
Hi All,
Is it possible to get column index from ResultSetMetaData ? I didn't see any methods for that...
Thanks,
seema
+Pie Number of slices to send: Send
what do u mean the coloumn index?
u mean u supply the name and u get the index number??
it usually works the other way around.
u have all the coloumns and u want to know their names.
+Pie Number of slices to send: Send
In my code, I need to call metadata.getColumnDisplaySize(i);
This method takes column index, at this point I know column name not the index. So can I pass columnname and get column index from metadata ?
+Pie Number of slices to send: Send
Not that I am aware of.
+Pie Number of slices to send: Send
"SeemaH",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp .
We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please re-register and select a new name which meets the requirements.
Thanks.
Dave
I do some of my very best work in water. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1105 times.
Similar Threads
How to Make DataGrid configured to act only on a Specific column on a Row
Does Oracle automatically create a unique index for PK ?
JTable dynamic column problem
setInt Null
how to sort a JTable straight before displaying it
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 04:57:33.