This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
I come from a .net world. One of the nice objects within its data access architecture is a "DataTable". This is similar to a resultset but with one significant difference - it is completely disconnected from its datasource. Which, unless I'm missing the point, is different to resultsets in that they hold connections until they are destroyed.
I like writing generic data layers in whatever language I'm using and am seeking to write a generic method that calls a stored procedure that will return multiple rows. I want then to pass this data to other areas of my application. It doesn't look like I can use a resultset as that would leave open connections all over the place.
I know I could write a method that fills a resultset and then populates classes with the contents of this data but this is not generic.
I've already written a class called (drum roll) "DataTable" which converts a resultset to xml which is generic but feels expensive in terms of resources.
Am I venturing down a cul-de-sac of bad practice? If so, what should I be doing?