473,386 Members | 1,779 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.

Multiple result sets from Data Reader

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.

Feb 2 '06 #1
1 3556
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.

Feb 2 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Darko Jovisic | last post by:
Hi! Another silly question: If a stored procedure returns multiple result sets, how do I choose the one I want to insert into a table? For example sp_spaceused returns two result sets if...
5
by: Oksana Yasynska | last post by:
Hi all, I'm running Postgres 7.2.1 and I need to return multiple row sets from plpgsql function. I'm new in plpgsql but according documentation and everything I could find in the mailing list...
5
by: Stanley Sinclair | last post by:
I have a need to return multiple result sets from a stored procedure. Want that SP to call others to get the data. Win2003, db2 8.1.5. Can't figure out how to handle open cursors, and return...
0
by: Randy Foster | last post by:
We have a stored procedure (on DB2 8.1 FP5) that returns multiple result sets which we are calling from Java (WebSphere 5.0.2.8). We can call the stored procedure from the DB2 command line...
4
by: Liz | last post by:
Anyone have any info on how you can fill a DataSet with mutiple result sets from a SQL batch ? I know with a dataReader you can use the nextResult method but I'm lost on how you do this with a...
0
by: prad | last post by:
Hi, Following java code returns 24 result sets.It counts number of rows in the first result set correctly.But doesnt count rows from next result set. When I debugged the code I found out that...
1
by: Mike | last post by:
Is it possible to use a SqlDataSource to return multiple result sets and if so, how do I access them? Thanks
3
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am wondering if someone could provide a code sample (or just a suggested approach) on how to fill a single DataGridView with multiple result sets. For example, this statement returns a one-line...
0
by: anilkodali | last post by:
How to compare multiple result sets with a set of values? Here is the scenario.. My query returns me multiple results(one column of data) and I want compare all the data at once with a set of...
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: 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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.