473,386 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Query data from multiple tables and saving back

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
5 3045
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Rigga | last post by:
Hi, I am new to mysql and need help on how to join tables. I have a database which contains 4 tables, the main table contains information by date order and the other 3 contain data also in date...
7
by: Phin | last post by:
I need your HELP! I've seen all the posts on using Crystal Reports within vs.net (vb.net) and changing a SQL query at runtime. When I tried to pass in a dataset into the crystal report at...
32
by: Neil Ginsberg | last post by:
We're using SQL Server 7 with an Access 2000 MDB as a front end with ODBC linked tables. I recently created a new set of tables for the app, and users are complaining that unsaved data is being...
6
by: Martin Lacoste | last post by:
Ok, before I headbutt the computer... don't know why when I add criteria in a query, I get an 'invalid procedure call'. I also don't know why after searching the help in access, the various access...
7
by: Daz | last post by:
Hi. I am trying to select data from two separate MySQL tables, where I cannot use join, but when I put the two select queries into a single query, I get an error telling me to check my syntax. Both...
6
by: MVM | last post by:
Hi, I am attempting to run a query in MS SQL server between two tables that have a one to many relationship. The tables are linked on GID. What I want is one instance of every record from Table...
1
by: Magnus | last post by:
I'm testing walkthrough saving data to a Database (Multiple Tables). http://msdn2.microsoft.com/en-us/library/4esb49b4(VS.80).aspx In the famous Customer/Order example, I'm getting referential...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.