By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,457 Members | 1,301 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,457 IT Pros & Developers. It's quick & easy.

Query data from multiple tables and saving back

P: n/a
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!
Dec 30 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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" <mi**@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
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!

Dec 31 '05 #2

P: n/a
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" <mi**@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
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!


Jan 5 '06 #3

P: n/a
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" <mi**@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
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" <mi**@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
> 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!
>
>


Jan 6 '06 #4

P: n/a
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" <mi**@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
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" <mi**@discussions.microsoft.com> wrote in message
news:55**********************************@microsof t.com...
> 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!
>
>


Jan 11 '06 #5

P: n/a
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" <mi**@discussions.microsoft.com> wrote in message
news:F6**********************************@microsof t.com...
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" <mi**@discussions.microsoft.com> wrote in message
news:2B**********************************@microsof t.com...
> 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" <mi**@discussions.microsoft.com> wrote in message
>> news:55**********************************@microsof t.com...
>> > 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!

Jan 12 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.