Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Retrieve Specific Fields with Built-in Operative

  1. #1
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default Retrieve Specific Fields with Built-in Operative

    When using WSI to retrieve information, is it possible to specify which fields are wanted?

    For example a simple operation to get all Manufacturers gets the entire table:

    <AspDotNetStorefrontImport Verbose="false">
    <GetEntityHelper EntityType="Manufacturer"/>
    </AspDotNetStorefrontImport>

    Is there a way to get only ID and Name?

    I know I can do this using embedded SQL but then I have to include the db name and we have multiple copies of aspdnsf and they all have different db names which makes the programming much more difficult.

  2. #2
    ASPAlfred is offline Senior Member
    Join Date
    Nov 2007
    Posts
    2,244

    Default

    The only way to achieve what you want would be like below, other than that customization is required:

    <ExecuteSQL Name="string">
    <SQL>
    <![CDATA[
    select FieldName from TableName where whatever clause you want
    ]]>
    </SQL>
    </ExecuteSQL>

  3. #3
    Tom Cox is offline Senior Member
    Join Date
    Nov 2009
    Location
    Los Angeles, CA
    Posts
    104

    Default

    Alfred,

    I believe that method requires the db name. I just built my sql with a db_name variable that I fill in at run time depending on which site was selected.

    It's not as "clean" as I'd like but it works OK.

    Thanks for your response.

    Tom