Query data from multiple tables and saving back

Discussion in 'ASP .Net' started by =?Utf-8?B?bWltbw==?=, Dec 30, 2005.

  1. Hello,

    I have seen samples on how to pull data from one table and save back to it
    using the Form View control.

    How do I pull from multiple tables and save back to multiple tables on one
    screen? Is there a sample of this somewhere?

    For example I want to create a Name and an Address from one screen. It has
    to create a Name Record, a Name Address Record, and a NameAddressJoin Record.


    Is there a sample of this so I can see how to pull form multiple tables and
    update to them? I did write a query to pull from them, but when I go to save
    how to I list multiple update and insert statements?

    Thanks!
    =?Utf-8?B?bWltbw==?=, Dec 30, 2005
    #1
    1. Advertising

  2. You can always use a stored procedure that contains multiple statements.
    You would pass a common set of parameters and only use them with updating
    and/or inserting into the appropriate table. Additionally, if necessary,
    you can also acquired any identity column value necessary to populate a
    second table that's a child to the first.
    --
    Christopher A. Reed
    "The oxen are slow, but the earth is patient."

    "mimo" <> wrote in message
    news:...
    > Hello,
    >
    > I have seen samples on how to pull data from one table and save back to it
    > using the Form View control.
    >
    > How do I pull from multiple tables and save back to multiple tables on one
    > screen? Is there a sample of this somewhere?
    >
    > For example I want to create a Name and an Address from one screen. It
    > has
    > to create a Name Record, a Name Address Record, and a NameAddressJoin
    > Record.
    >
    >
    > Is there a sample of this so I can see how to pull form multiple tables
    > and
    > update to them? I did write a query to pull from them, but when I go to
    > save
    > how to I list multiple update and insert statements?
    >
    > Thanks!
    >
    >
    Christopher Reed, Dec 31, 2005
    #2
    1. Advertising

  3. Is there a good sample of this somewhere? I wrote stored procedures to
    populate, update, insert, and to save the form but some reason it isn't
    working I'm wondering if I have to do something in ASP.NET to make them run
    correctly. All the stored procedures run in Query Analyzer fine.

    "Christopher Reed" wrote:

    > You can always use a stored procedure that contains multiple statements.
    > You would pass a common set of parameters and only use them with updating
    > and/or inserting into the appropriate table. Additionally, if necessary,
    > you can also acquired any identity column value necessary to populate a
    > second table that's a child to the first.
    > --
    > Christopher A. Reed
    > "The oxen are slow, but the earth is patient."
    >
    > "mimo" <> wrote in message
    > news:...
    > > Hello,
    > >
    > > I have seen samples on how to pull data from one table and save back to it
    > > using the Form View control.
    > >
    > > How do I pull from multiple tables and save back to multiple tables on one
    > > screen? Is there a sample of this somewhere?
    > >
    > > For example I want to create a Name and an Address from one screen. It
    > > has
    > > to create a Name Record, a Name Address Record, and a NameAddressJoin
    > > Record.
    > >
    > >
    > > Is there a sample of this so I can see how to pull form multiple tables
    > > and
    > > update to them? I did write a query to pull from them, but when I go to
    > > save
    > > how to I list multiple update and insert statements?
    > >
    > > Thanks!
    > >
    > >

    >
    >
    >
    =?Utf-8?B?bWltbw==?=, Jan 5, 2006
    #3
  4. If you're using SqlCommand, the CommandType property should be set to
    StoredProcedure.
    --
    Christopher A. Reed
    "The oxen are slow, but the earth is patient."

    "mimo" <> wrote in message
    news:...
    > Is there a good sample of this somewhere? I wrote stored procedures to
    > populate, update, insert, and to save the form but some reason it isn't
    > working I'm wondering if I have to do something in ASP.NET to make them
    > run
    > correctly. All the stored procedures run in Query Analyzer fine.
    >
    > "Christopher Reed" wrote:
    >
    >> You can always use a stored procedure that contains multiple statements.
    >> You would pass a common set of parameters and only use them with updating
    >> and/or inserting into the appropriate table. Additionally, if necessary,
    >> you can also acquired any identity column value necessary to populate a
    >> second table that's a child to the first.
    >> --
    >> Christopher A. Reed
    >> "The oxen are slow, but the earth is patient."
    >>
    >> "mimo" <> wrote in message
    >> news:...
    >> > Hello,
    >> >
    >> > I have seen samples on how to pull data from one table and save back to
    >> > it
    >> > using the Form View control.
    >> >
    >> > How do I pull from multiple tables and save back to multiple tables on
    >> > one
    >> > screen? Is there a sample of this somewhere?
    >> >
    >> > For example I want to create a Name and an Address from one screen. It
    >> > has
    >> > to create a Name Record, a Name Address Record, and a NameAddressJoin
    >> > Record.
    >> >
    >> >
    >> > Is there a sample of this so I can see how to pull form multiple tables
    >> > and
    >> > update to them? I did write a query to pull from them, but when I go
    >> > to
    >> > save
    >> > how to I list multiple update and insert statements?
    >> >
    >> > Thanks!
    >> >
    >> >

    >>
    >>
    >>
    Christopher Reed, Jan 6, 2006
    #4
  5. Is there a sample of this somewhere? I'm using the GridView wizards so I am
    not writing any code to do this but the Wizards never seem to work for me. :(

    "Christopher Reed" wrote:

    > If you're using SqlCommand, the CommandType property should be set to
    > StoredProcedure.
    > --
    > Christopher A. Reed
    > "The oxen are slow, but the earth is patient."
    >
    > "mimo" <> wrote in message
    > news:...
    > > Is there a good sample of this somewhere? I wrote stored procedures to
    > > populate, update, insert, and to save the form but some reason it isn't
    > > working I'm wondering if I have to do something in ASP.NET to make them
    > > run
    > > correctly. All the stored procedures run in Query Analyzer fine.
    > >
    > > "Christopher Reed" wrote:
    > >
    > >> You can always use a stored procedure that contains multiple statements.
    > >> You would pass a common set of parameters and only use them with updating
    > >> and/or inserting into the appropriate table. Additionally, if necessary,
    > >> you can also acquired any identity column value necessary to populate a
    > >> second table that's a child to the first.
    > >> --
    > >> Christopher A. Reed
    > >> "The oxen are slow, but the earth is patient."
    > >>
    > >> "mimo" <> wrote in message
    > >> news:...
    > >> > Hello,
    > >> >
    > >> > I have seen samples on how to pull data from one table and save back to
    > >> > it
    > >> > using the Form View control.
    > >> >
    > >> > How do I pull from multiple tables and save back to multiple tables on
    > >> > one
    > >> > screen? Is there a sample of this somewhere?
    > >> >
    > >> > For example I want to create a Name and an Address from one screen. It
    > >> > has
    > >> > to create a Name Record, a Name Address Record, and a NameAddressJoin
    > >> > Record.
    > >> >
    > >> >
    > >> > Is there a sample of this so I can see how to pull form multiple tables
    > >> > and
    > >> > update to them? I did write a query to pull from them, but when I go
    > >> > to
    > >> > save
    > >> > how to I list multiple update and insert statements?
    > >> >
    > >> > Thanks!
    > >> >
    > >> >
    > >>
    > >>
    > >>

    >
    >
    >
    =?Utf-8?B?bWltbw==?=, Jan 11, 2006
    #5
  6. Look at the Quick Starts tutorials. I believe you can access them
    www.asp.net .

    With GridViews, you'll probably use the SqlDataSource, so the attribute in
    question is the SelectCommandType.
    --
    Christopher A. Reed
    "The oxen are slow, but the earth is patient."

    "mimo" <> wrote in message
    news:...
    > Is there a sample of this somewhere? I'm using the GridView wizards so I
    > am
    > not writing any code to do this but the Wizards never seem to work for me.
    > :(
    >
    > "Christopher Reed" wrote:
    >
    >> If you're using SqlCommand, the CommandType property should be set to
    >> StoredProcedure.
    >> --
    >> Christopher A. Reed
    >> "The oxen are slow, but the earth is patient."
    >>
    >> "mimo" <> wrote in message
    >> news:...
    >> > Is there a good sample of this somewhere? I wrote stored procedures to
    >> > populate, update, insert, and to save the form but some reason it isn't
    >> > working I'm wondering if I have to do something in ASP.NET to make them
    >> > run
    >> > correctly. All the stored procedures run in Query Analyzer fine.
    >> >
    >> > "Christopher Reed" wrote:
    >> >
    >> >> You can always use a stored procedure that contains multiple
    >> >> statements.
    >> >> You would pass a common set of parameters and only use them with
    >> >> updating
    >> >> and/or inserting into the appropriate table. Additionally, if
    >> >> necessary,
    >> >> you can also acquired any identity column value necessary to populate
    >> >> a
    >> >> second table that's a child to the first.
    >> >> --
    >> >> Christopher A. Reed
    >> >> "The oxen are slow, but the earth is patient."
    >> >>
    >> >> "mimo" <> wrote in message
    >> >> news:...
    >> >> > Hello,
    >> >> >
    >> >> > I have seen samples on how to pull data from one table and save back
    >> >> > to
    >> >> > it
    >> >> > using the Form View control.
    >> >> >
    >> >> > How do I pull from multiple tables and save back to multiple tables
    >> >> > on
    >> >> > one
    >> >> > screen? Is there a sample of this somewhere?
    >> >> >
    >> >> > For example I want to create a Name and an Address from one screen.
    >> >> > It
    >> >> > has
    >> >> > to create a Name Record, a Name Address Record, and a
    >> >> > NameAddressJoin
    >> >> > Record.
    >> >> >
    >> >> >
    >> >> > Is there a sample of this so I can see how to pull form multiple
    >> >> > tables
    >> >> > and
    >> >> > update to them? I did write a query to pull from them, but when I
    >> >> > go
    >> >> > to
    >> >> > save
    >> >> > how to I list multiple update and insert statements?
    >> >> >
    >> >> > Thanks!
    Christopher Reed, Jan 12, 2006
    #6
    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. Nikhil Patel

    saving data back to dataset

    Nikhil Patel, Sep 30, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    456
    =?Utf-8?B?RU5JWklO?=
    Sep 30, 2004
  2. Daves
    Replies:
    1
    Views:
    626
    S. Justin Gengo
    Jan 6, 2006
  3. Jesper Sahner
    Replies:
    5
    Views:
    392
    Galen Boyer
    Oct 28, 2004
  4. Chris Brat
    Replies:
    5
    Views:
    687
    =?iso-8859-1?q?Luis_M._Gonz=E1lez?=
    Aug 22, 2006
  5. Luna

    LINQ query from multiple tables

    Luna, Dec 18, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    371
Loading...

Share This Page