Originally posted by p Ingle:
Can you pass Resultset as an argument or input parameter to a method
Yes
Can you return ResultSet from a method?
Yes, A method where you are executing your query you may return resultset
One point to be noted that an application has several role/operations and you can logically/physically seperate them as per their responsibility.
for example in MVC speration of responsibility are
controlling request
Selection of view
business logic layer
Similarly there is a layer in your application
Data layer where you can say you are doing operations related to database. If your question related to data layer then it is ok.such operation should be limited to data layer, else instead of returning a resultset from a method you can return VOs or DTOs.
Shailesh