Help constructing a database-type view from a DataSet object

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gary

    Help constructing a database-type view from a DataSet object

    I have a DataSet where two tables have a relation (the
    parent / child relationship is also successfully added to
    the DataSet Relations collection). I am looking for a
    way to programmaticall y construct something analogous to
    a database view where the record (or row) would show
    table1.Field1, table1.field2, table2.Field2, etc.

    I tried using a DataView object, but this appears to
    allow only filtering and sorting.

    Does anyone know how to crate such a view from DataSet
    tables and relations?

    Gary

  • One Handed Man [ OHM# ]

    #2
    Re: Help constructing a database-type view from a DataSet object


    Really, I would expect you to do this in your query using a join resulting
    in a single table.


    OHM

    Gary wrote:[color=blue]
    > I have a DataSet where two tables have a relation (the
    > parent / child relationship is also successfully added to
    > the DataSet Relations collection). I am looking for a
    > way to programmaticall y construct something analogous to
    > a database view where the record (or row) would show
    > table1.Field1, table1.field2, table2.Field2, etc.
    >
    > I tried using a DataView object, but this appears to
    > allow only filtering and sorting.
    >
    > Does anyone know how to crate such a view from DataSet
    > tables and relations?
    >
    > Gary[/color]

    Regards - OHM# OneHandedMan{at }BTInternet{dot }com


    Comment

    • Guest's Avatar

      #3
      Re: Help constructing a database-type view from a DataSet object


      OHM

      I have a project-related constraint not allowing me use a
      join within an SQL statement. Specifically, my lookup
      tables are stored in an XML file which are read into a
      DataSet. I use an SQL statement to select records from
      SQLServer and add those records into a Table within the
      DataSet.

      So, do you have ideas on how I might accomplish this task?
      [color=blue]
      >-----Original Message-----
      >
      >Really, I would expect you to do this in your query[/color]
      using a join resulting[color=blue]
      >in a single table.
      >
      >
      >OHM
      >
      >Gary wrote:[color=green]
      >> I have a DataSet where two tables have a relation (the
      >> parent / child relationship is also successfully added[/color][/color]
      to[color=blue][color=green]
      >> the DataSet Relations collection). I am looking for a
      >> way to programmaticall y construct something analogous[/color][/color]
      to[color=blue][color=green]
      >> a database view where the record (or row) would show
      >> table1.Field1, table1.field2, table2.Field2, etc.
      >>
      >> I tried using a DataView object, but this appears to
      >> allow only filtering and sorting.
      >>
      >> Does anyone know how to crate such a view from DataSet
      >> tables and relations?
      >>
      >> Gary[/color]
      >
      >Regards - OHM# OneHandedMan{at }BTInternet{dot }com
      >
      >
      >.
      >[/color]

      Comment

      • One Handed Man [ OHM# ]

        #4
        Re: Help constructing a database-type view from a DataSet object

        ermm. There is something similar that you can do with the bindings on a pair
        of datagrids where you can point the datasource for the second grid to the
        relation. This has the effect of an Order/Order Details display for grid one
        and two so if you click on the order the details are displayed in the bottom
        without any coding at all.

        Perhaps this functionality could be leveraged to acomplish what you are
        trying to do. I dont think there is a direct way to do this, having said
        that, it probably would be wise to post this to the adonet newsgroup where
        people answer questions like this all the time, someone may have done this.
        If so please come back and let us know what the solution was.

        Regards - OHM

        anonymous@discu ssions.microsof t.com wrote:[color=blue]
        > OHM
        >
        > I have a project-related constraint not allowing me use a
        > join within an SQL statement. Specifically, my lookup
        > tables are stored in an XML file which are read into a
        > DataSet. I use an SQL statement to select records from
        > SQLServer and add those records into a Table within the
        > DataSet.
        >
        > So, do you have ideas on how I might accomplish this task?
        >[color=green]
        >> -----Original Message-----
        >>
        >> Really, I would expect you to do this in your query using a join
        >> resulting in a single table.
        >>
        >>
        >> OHM
        >>
        >> Gary wrote:[color=darkred]
        >>> I have a DataSet where two tables have a relation (the
        >>> parent / child relationship is also successfully added to
        >>> the DataSet Relations collection). I am looking for a
        >>> way to programmaticall y construct something analogous to
        >>> a database view where the record (or row) would show
        >>> table1.Field1, table1.field2, table2.Field2, etc.
        >>>
        >>> I tried using a DataView object, but this appears to
        >>> allow only filtering and sorting.
        >>>
        >>> Does anyone know how to crate such a view from DataSet
        >>> tables and relations?
        >>>
        >>> Gary[/color]
        >>
        >> Regards - OHM# OneHandedMan{at }BTInternet{dot }com
        >>
        >>
        >> .[/color][/color]

        Regards - OHM# OneHandedMan{at }BTInternet{dot }com


        Comment

        Working...