Can I access rows & cols with a data source

Discussion in 'ASP .Net' started by Ant, Nov 19, 2007.

  1. Ant

    Ant Guest

    Hi,
    I'm new to ASP & the new ADO data model so please excuse the ignorance.

    I have created a data source by simply dragging a table onto the design view.
    Can I now pragmatically access columns & rows of that table via the data
    source or must I transfer the data into another object (table, view etc)?

    Many thanks for any help here
    Ant
     
    Ant, Nov 19, 2007
    #1
    1. Advertising

  2. Ant

    Mike Guest

    "Ant" <> wrote in message
    news:...
    > Hi,
    > I'm new to ASP & the new ADO data model so please excuse the ignorance.
    >
    > I have created a data source by simply dragging a table onto the design
    > view.
    > Can I now pragmatically access columns & rows of that table via the data
    > source or must I transfer the data into another object (table, view etc)?
    >
    > Many thanks for any help here
    > Ant


    This depends on the mode of the datasource control. Its default setting is
    DataSet, which returns a DataView object. The alternative, DataReader,
    returns a DataReader object. Both are accessible by calling the datasource
    control's Delect method:
    http://www.mikesdotnetting.com/Article.aspx?ArticleID=45

    Mike
     
    Mike, Nov 19, 2007
    #2
    1. Advertising

  3. Ant

    Ant Guest

    "Mike" wrote:

    >
    > "Ant" <> wrote in message
    > news:...
    > > Hi,
    > > I'm new to ASP & the new ADO data model so please excuse the ignorance.
    > >
    > > I have created a data source by simply dragging a table onto the design
    > > view.
    > > Can I now pragmatically access columns & rows of that table via the data
    > > source or must I transfer the data into another object (table, view etc)?
    > >
    > > Many thanks for any help here
    > > Ant

    >
    > This depends on the mode of the datasource control. Its default setting is
    > DataSet, which returns a DataView object. The alternative, DataReader,
    > returns a DataReader object. Both are accessible by calling the datasource
    > control's Delect method:
    > http://www.mikesdotnetting.com/Article.aspx?ArticleID=45
    >
    > Mike
    >
    >
    >



    Thank you.

    So if I had a Dataasource object would it be:

    Dataview dv = myDataSource;

    Many thanks for your help

    Ant
     
    Ant, Nov 19, 2007
    #3
  4. Ant

    Ant Guest

    "Mike" wrote:

    >
    > "Ant" <> wrote in message
    > news:...
    > > Hi,
    > > I'm new to ASP & the new ADO data model so please excuse the ignorance.
    > >
    > > I have created a data source by simply dragging a table onto the design
    > > view.
    > > Can I now pragmatically access columns & rows of that table via the data
    > > source or must I transfer the data into another object (table, view etc)?
    > >
    > > Many thanks for any help here
    > > Ant

    >
    > This depends on the mode of the datasource control. Its default setting is
    > DataSet, which returns a DataView object. The alternative, DataReader,
    > returns a DataReader object. Both are accessible by calling the datasource
    > control's Delect method:
    > http://www.mikesdotnetting.com/Article.aspx?ArticleID=45
    >
    > Mike
    >


    Hi Mike,

    Thank you, that worked. I used the Select method into a Dataview.

    Thank you very much
    Ant
     
    Ant, Nov 19, 2007
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. PontiMax
    Replies:
    0
    Views:
    419
    PontiMax
    Jan 12, 2005
  2. phl
    Replies:
    2
    Views:
    2,005
  3. Eddie B.

    Hide data grid cols?

    Eddie B., Oct 17, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    149
    S. Spurlock
    Oct 17, 2003
  4. PontiMax

    Datagrid: Selecting multiple rows/cols

    PontiMax, Jan 12, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    177
    Michelle Hlaing
    Feb 21, 2005
  5. johkar

    Speed up onmouseover of rows and cols

    johkar, Sep 22, 2004, in forum: Javascript
    Replies:
    6
    Views:
    107
    Jim Ley
    Oct 5, 2004
Loading...

Share This Page