Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tommy Poulsen 514 posts 708 karma points
    Jan 27, 2010 @ 13:44
    Tommy Poulsen
    0

    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?

     

  • Rob Watkins 369 posts 701 karma points
    Feb 17, 2011 @ 16:34
    Rob Watkins
    0

    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.

  • Rob Watkins 369 posts 701 karma points
    Feb 28, 2011 @ 12:19
    Rob Watkins
    0

    Is there ANY way of doing ths in a database independent way using the DataLayer stuff?

Please Sign in or register to post replies

Write your reply to:

Draft