c# xpath queries c# xpath queries
Posts 1 to 7 of 7
  1. #1

    ScotsPine

    Guest

    Default c# xpath queries

    does anybody know how to pass in more than a single parameter to an xpath query?

    i have...(hope ezboard leaves the code alone)

    cmd.CommandType = SqlXmlCommandType.XPath;
    cmd.RootTag = "ROOT";
    cmd.Namespaces= "xmlns:x ='urn:myschema:PersonDetails'";
    cmd.SchemaPath= absPath + "\\referralSchemaForUpdates.xsd";
    cmd.CommandText = "PersonDetails[@PersonID=\"_personid\"[PersonDetails/ReferralDetails[@ReferralId=\"_referralid\"]]";

    i need to pass two parms into the commandtext.

  2. #2

    DimPrawn

    Guest

    Default Bug

    Looks like a little bug has crept into your code :x

    If only they were that easy to spot.

    I have not idea what the answer is.

    Try MSDN, Google or somewhere like experts exchange.

    Good luck.

  3. #3

    ScotsPine

    Guest

    Default Bug

    yes - that particular bug is 'by design'

  4. #4

    AtW

    Guest

    Default Re: Bug

    LOL, ScotsPine, any chance you could give a few good reasons _why_ to use XML/XSLT for a query???

  5. #5

    ScotsPine

    Guest

    Default Re: Bug

    1. i'm tired of t-sql
    2. diffgrams and updategrams are fun
    3. schema/datasets/classes in c# are new
    4. xml is native in .net data objects
    5. it's fast
    6. it's the future
    7. it's portable
    8. it's scalable
    9. it's good with firewalls
    10. the client wants it!


  6. #6

    AtW

    Guest

    Default Re: Bug


  7. #7

    ScotsPine

    Guest

    Default Re: Bug

    fixed

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •