Beginner |
|
Joined: Thu Jan 22, 2004 6:16 am Posts: 40 Location: Luxembourg
|
How do I get out the number of columns from a ScrollableResult ?
When using the java.sql package, it can be done like this :
//Assume results is of class java.sql.ResultSet
//Assume rsmd id os class java.sql.ResultSetMetaData
rsmd = results.getMetaData ( );
numCols = rsmd.getColumnCount ( );
How do I do the similar with Hibernate ?
For the moment, I have the following code :
//Assume hql is an interface of net.sf.hibernate.Query
//Assume results is an interface of net.sf.hibernate.ScrollableResult
hql = session.createQuery(sql);
results = hql.scroll();
How do I continue to get the number of columns out from "results"
Cheers
|
|