CRUD with ADO.NET

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

    CRUD with ADO.NET

    Hello,

    I have a C# problem that I hope you could help me with.

    I'm making a program where I need data from a database using ADO.NET.

    The problem is that I can't figure out how to retrieve the data without
    using a datagrid (I presume that a dataset is the correct solution, when I
    also need to CRUD (Create-Read-Update-Delete).

    I need to use the data in my system instead of displaying it in the GUI, but
    I haven't found any examples that could help me.

    In other words: I need to read data from a database and storage it in a
    arraylist (or whatever) with the possibility to CRUD using ADO.NET.



    best regards

    Torben


  • Diwakar R

    #2
    Re: CRUD with ADO.NET

    Hi,

    I guess what you are looking for is a DataSet. To cut a long story short, a
    dataset is an inmemory disconnected data representation.

    You could get all your data into a dataset, work with the
    datatables,data colums and datarows in the dataset to do CRUD.

    For more info on how to use the Dataset, Pl lookup the reference ( I guess
    there is no point in my repeating what is already published :) )

    -Diws


    "Torben Madsen" <askholm@privat .dk> wrote in message
    news:utojOs7lDH A.2456@TK2MSFTN GP09.phx.gbl...[color=blue]
    > Hello,
    >
    > I have a C# problem that I hope you could help me with.
    >
    > I'm making a program where I need data from a database using ADO.NET.
    >
    > The problem is that I can't figure out how to retrieve the data without
    > using a datagrid (I presume that a dataset is the correct solution, when I
    > also need to CRUD (Create-Read-Update-Delete).
    >
    > I need to use the data in my system instead of displaying it in the GUI,[/color]
    but[color=blue]
    > I haven't found any examples that could help me.
    >
    > In other words: I need to read data from a database and storage it in a
    > arraylist (or whatever) with the possibility to CRUD using ADO.NET.
    >
    >
    >
    > best regards
    >
    > Torben
    >
    >[/color]


    Comment

    • Bjorn A

      #3
      Re: CRUD with ADO.NET

      Torben wrote:
      [color=blue]
      > The problem is that I can't figure out how to retrieve
      > the data without using a datagrid (I presume that a
      > dataset is the correct solution, when I
      > also need to CRUD (Create-Read-Update-Delete).[/color]

      Not necessarily, many advocates the use of "disconnect ed" sets. In that case
      you simply read the data, check what you have to do, and make those changes
      in another call.
      [color=blue]
      > I need to use the data in my system instead of
      > displaying it in the GUI, but I haven't found
      > any examples that could help me.[/color]

      Since you're danish, maybe this compendium can
      help you, though it's written in swedish... ;-)



      It doesn't solve your question per se, since it doesn't use connected sets
      exactly as you've asked for, but it maybe can give you some hints, and at
      least some alternatives.

      // Bjorn A


      Comment

      • Torben Madsen

        #4
        Re: CRUD with ADO.NET

        tusind tak og mange gode guldbajere Bjorn ;o)
        -med lidt modifikationer fik jeg det til at virke :o)

        (thanks a bunch Bjorn, its worked with some modifications)

        best regards
        Torben

        "Bjorn A" <bjorn_andersso n@DoNotSpam.hot mail.com> skrev i en meddelelse
        news:uQtssF8lDH A.2592@TK2MSFTN GP10.phx.gbl...[color=blue]
        > Torben wrote:
        >[color=green]
        > > The problem is that I can't figure out how to retrieve
        > > the data without using a datagrid (I presume that a
        > > dataset is the correct solution, when I
        > > also need to CRUD (Create-Read-Update-Delete).[/color]
        >
        > Not necessarily, many advocates the use of "disconnect ed" sets. In that[/color]
        case[color=blue]
        > you simply read the data, check what you have to do, and make those[/color]
        changes[color=blue]
        > in another call.
        >[color=green]
        > > I need to use the data in my system instead of
        > > displaying it in the GUI, but I haven't found
        > > any examples that could help me.[/color]
        >
        > Since you're danish, maybe this compendium can
        > help you, though it's written in swedish... ;-)
        >
        > http://www.eki.mdh.se/kurshemsidor/i...endier/DB3.pdf
        >
        > It doesn't solve your question per se, since it doesn't use connected sets
        > exactly as you've asked for, but it maybe can give you some hints, and at
        > least some alternatives.
        >
        > // Bjorn A
        >
        >[/color]


        Comment

        Working...