473,569 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Multiple select statements in a single stored procedure.

I have coded multiple select statements in a single stored procedure, and
when I execute this procedure on SQL Server Management Express, I correctly
get multiple result sets. But, if I try to add a new Data Source to to my VB
2005 project, and point to this stored procedure, the data source wizard only
sees the 'first' select statement. Is there a way to load multiple tables in
a DataSet from a single stored procedure with multiple select statements?
TIA,
--
Terry
Jul 6 '07 #1
2 5074
Terry,

The first already gives your answer

http://groups.google.com/group/micro...8d87927915d6fe

Cor

"Terry" <Te***@nospam.n ospamschreef in bericht
news:33******** *************** ***********@mic rosoft.com...
>I have coded multiple select statements in a single stored procedure, and
when I execute this procedure on SQL Server Management Express, I
correctly
get multiple result sets. But, if I try to add a new Data Source to to my
VB
2005 project, and point to this stored procedure, the data source wizard
only
sees the 'first' select statement. Is there a way to load multiple tables
in
a DataSet from a single stored procedure with multiple select statements?
TIA,
--
Terry

Jul 6 '07 #2
Hi Cor,
Thank you for yopur responce, but, the link you sent me to is in fact
wrong! At least as far as VS2005 is concerned. Under VS2003, when you drag
a stored procedure on the the form and generate a dataset, you get a table
for each select statement. Under VS2005 you only get a table for the first
select statement. Is this change in behavior intentional? If so, I wonder
why. It sounds like a bug to me.
--
Terry
"Cor Ligthert [MVP]" wrote:
Terry,

The first already gives your answer

http://groups.google.com/group/micro...8d87927915d6fe

Cor

"Terry" <Te***@nospam.n ospamschreef in bericht
news:33******** *************** ***********@mic rosoft.com...
I have coded multiple select statements in a single stored procedure, and
when I execute this procedure on SQL Server Management Express, I
correctly
get multiple result sets. But, if I try to add a new Data Source to to my
VB
2005 project, and point to this stored procedure, the data source wizard
only
sees the 'first' select statement. Is there a way to load multiple tables
in
a DataSet from a single stored procedure with multiple select statements?
TIA,
--
Terry


Jul 9 '07 #3

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

Similar topics

2
6394
by: Richard Adams | last post by:
Is it possible to execute more than one statement in SQL via MDAC ODBC? I have a fairly complex select I wanted to create a view with, but trying to send it all as one string with terminators ';' between doesn't work (invalid character.) How can I do this kind of thing from VB.NET? Thanks in advance Richard
5
6910
by: Lauren Quantrell | last post by:
Just wondering if this is good form: Alter Procedure "mySPName" @UniqueID int AS set nocount on set xact_abort off DELETE FROM tblNameOne
1
2582
by: Top Gun | last post by:
In order to avoid multiple trips to the database, I would like to fill several tables in a DataSet with a single call to a stored procedure that will return resultsets for the appropriate tables. Can the SqlDataReader be used for this?
1
11559
by: Ahmet Karaca | last post by:
Hi. myds.Reset(); mycommand.SelectCommand.CommandText= "Select att1 from Ing as Ingredient, Pro as Product "+ "where Pro.ad='apple' and Pro.id=Ing.id"; mycommand.Fill(myds, "Product"); // Here is the problem listbox.DataSource = myds.Tables.DefaultView; // Here again listbox.DataTextField = "invid"; // Here again listbox.DataBind();...
7
2990
by: Matt Jensen | last post by:
Howdy Fairly simple question I think, I presume the answer is no it can't be reused for 2 *SELECT* statements, but just hoping for clarification. Just asking in the interests of trying to minimise code. i.e. if the SqlDataAdapter uses a connection to the one database for a select statement and I want to do a second select statement on...
1
7245
by: syntego | last post by:
I am using DB2 V8 fixpack 10 and have the following issue: >From a User Defined Function, I can assign multiple variables in a single statement as follows: -- Get the first update transaction for the mailing event. set (fUpdateTS, fAddrType, fAccountID, fOpCode) = (select AddTS, UpdateTypeCode, AccountID, OpCode FROM
5
12245
by: alingsjtu | last post by:
Hello, every body. When execute dynamic generated multiple OPENQUERY statements (which linkes to DB2) in SQLServer, I always got SQL1040N The maximum number of applications is already connected to the database. SQLSTATE=57030. Background: I created a linked server to DB2 8.1 database which called GRR_DB2Server. In my stored procedure...
7
20304
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g. Please help, I'm trying to write an ASP page to use ADO to run a long query against an Oracle 10g database, to create tables, if they do not already exist. In terms of ASP/ADO, that would be fine in a SQL Server Sense by a simply ASP/Server-Side JavaScript as such: var...
4
6926
by: vertigo262 | last post by:
Is it possible to use to select statements in a stored procedure? I am building a movie rating system, what I am doing is creating a table with movies and individual user ratings. The code needs to get a count of the ratings, then the sum of them to get the percentage. I am getting a error Exception Details:...
0
7698
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7673
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3640
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1213
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.