Re: Call SqlCommand.ExecuteReader inside another SqlCommand.ExecuteRea
- From: "Stephany Young" <noone@localhost>
- Date: Thu, 25 Jan 2007 12:15:40 +1300
Any SqlConnection object can only have one active SqlDataReader at a time.
To do what you need to do you need to have a second SqlConnection object for
the inner SqlDataReader.
I do not think that a 'transaction' can span multiple connections.
It appears that you are only 'reading' so there does not appear to be any
need for a transaction.
"David Thielen" <thielen@xxxxxxxxxxxxx> wrote in message
news:B99A7816-4975-476B-B0D6-52C32359CA13@xxxxxxxxxxxxxxxx
ps - with all of this within the same transaction.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"David Thielen" wrote:
Hi;
I need to call SqlCommand.ExecuteReader and then inside a while
(reader.Read()) I need to call another SqlCommand.ExecuteReader. I need
to do
this because I have a FK:PK relationship and based on the FK read, then
read
the row in that related table - if the FK is not null.
How can I do this?
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
.
- Follow-Ups:
- Re: Call SqlCommand.ExecuteReader inside another SqlCommand.Execut
- From: David Thielen
- Re: Call SqlCommand.ExecuteReader inside another SqlCommand.Execut
- Prev by Date: SqlDataSource with multiple data tables
- Next by Date: Re: Call SqlCommand.ExecuteReader inside another SqlCommand.Execut
- Previous by thread: SqlDataSource with multiple data tables
- Next by thread: Re: Call SqlCommand.ExecuteReader inside another SqlCommand.Execut
- Index(es):
Relevant Pages
|