How do I retrieve a whole row of data at once, instead of calling an individual ResultSet.getXXX method for each column?
Answer / Sudhanshu Bajpai
To retrieve an entire row of data at once in JDBC, you can use the `ResultSet.getArray(int)` or `ResultSet.getObject(int)` methods which return a `java.sql.Array` or `java.sql.Object` respectively for that column. For SQL Server, you can also use the `SqlData` interface to retrieve complex types such as `UserDefinedTypes`.
| Is This Answer Correct ? | 0 Yes | 0 No |
How to move the cursor in scrollable resultset ?
What is database null and Java null?
What is a merge field?
What is Type-1 Driver and when this driver is used?
what are design patterns?
What is statement and preparedstatement in java?
Is jdbc object oriented?
What is a jdbc connection?
What is the use of JDBC DriverManager class?
How can I get or redirect the log used by DriverManager and JDBC drivers?
Where can I find info, frameworks and example source for writing a JDBC driver?
Why would you use setautocommit(false) in jdbc?