PC Review


Reply
Thread Tools Rate Thread

Multiple result sets from Data Reader

 
 
=?Utf-8?B?S2VpdGggRw==?=
Guest
Posts: n/a
 
      2nd Feb 2006
Hi

I'm using VS 2003 to create a database application connecting to an Access
database through OleDb.
I've used the OleDbDataReader many times to populate comboboxes or treeviews
but only accessed one table at a time into the result set. No problem.

To be more efficient with the connection I would like to read several tables
at once by combining the sql select commands and using the datareader
NextResult to read each table in turn.
I can see examples of sqlDataReader doing this but not OleDbDataReader.
e.g.
"SELECT Name, Age FROM tbl_Employees; SELECT Sales, Qtr FROM tbl_Region"
I've tried this with and without the ';' separator but without success.

Thanks in advance for any comments.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?S2VycnkgTW9vcm1hbg==?=
Guest
Posts: n/a
 
      2nd Feb 2006
Keith,

I don't believe Access supports multiple SQL statements like SQL Server does.

Kerry Moorman


"Keith G" wrote:

> Hi
>
> I'm using VS 2003 to create a database application connecting to an Access
> database through OleDb.
> I've used the OleDbDataReader many times to populate comboboxes or treeviews
> but only accessed one table at a time into the result set. No problem.
>
> To be more efficient with the connection I would like to read several tables
> at once by combining the sql select commands and using the datareader
> NextResult to read each table in turn.
> I can see examples of sqlDataReader doing this but not OleDbDataReader.
> e.g.
> "SELECT Name, Age FROM tbl_Employees; SELECT Sales, Qtr FROM tbl_Region"
> I've tried this with and without the ';' separator but without success.
>
> Thanks in advance for any comments.
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SqlDataSource Multiple Result Sets Mike Microsoft ASP .NET 1 15th Mar 2007 11:34 PM
Re: Multiple result sets Sahil Malik Microsoft ADO .NET 0 7th Mar 2005 08:50 PM
Shaping data/multiple result sets - hmmm... Mike Kingscott Microsoft ASP .NET 0 27th Aug 2003 02:39 PM
Re: Multiple result sets Kathleen Dollard Microsoft ADO .NET 0 14th Jul 2003 04:27 PM
Re: Multiple result sets Joe Fallon Microsoft ADO .NET 0 12th Jul 2003 08:32 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:01 PM.