How to get field names/values dynamically using SqlHelper ?
After some inverstigations I figured I would like to use the SqlHelper class for my purpose of binding a sql source to a gridview in a new Umbraco control package I'm working on, but
it seems to me that I need to know the individual field names of the query specifically to get
access to the values, thus having to parse the input sql query or,
alternatively, generate supply the individual field names separately and tables
as input, thus loosing some of the power of sql expressions and also making the
mechanism much more complex.
I have been looking for ways to fetch the available field names
dynamically using the SqlHelper class, e.g. from the IRecordsReader, but apparently thats not
possible.
No-one got an answer, even if it's just a "you can't do it"? It's quite annoying not being able to retrieve a field list, means you have to write hardcoded wrappers for everything.
How to get field names/values dynamically using SqlHelper ?
After some inverstigations I figured I would like to use the SqlHelper class for my purpose of binding a sql source to a gridview in a new Umbraco control package I'm working on, but it seems to me that I need to know the individual field names of the query specifically to get access to the values, thus having to parse the input sql query or, alternatively, generate supply the individual field names separately and tables as input, thus loosing some of the power of sql expressions and also making the mechanism much more complex.
I have been looking for ways to fetch the available field names dynamically using the SqlHelper class, e.g. from the IRecordsReader, but apparently thats not possible.
Any suggestions on how to solve this?
No-one got an answer, even if it's just a "you can't do it"? It's quite annoying not being able to retrieve a field list, means you have to write hardcoded wrappers for everything.
Is there ANY way of doing ths in a database independent way using the DataLayer stuff?
is working on a reply...