|
-
Jul 24th, 2008, 12:20 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] Multiple Selects in Stored Proc SQL 2000
Not sure if this would be better handled in the vb.net section but here goes.
Is there a way that I could call a single stored procedure that has multiple selects in it and easily assign them to their own datatable within a dataset?
So one stored procedure would be basically the datasource for multipe datatables?
Or should I just stop being lazy and break them up?
Thanks
Blah wrong forum... please move to database section
-
Jul 24th, 2008, 12:22 PM
#2
Re: Multiple Selects in Stored Proc SQL 2000
 Originally Posted by Besoup
Blah wrong forum... please move to database section
Done.
-
Jul 24th, 2008, 12:26 PM
#3
Re: Multiple Selects in Stored Proc SQL 2000
 Originally Posted by Besoup
Is there a way that I could call a single stored procedure that has multiple selects in it and easily assign them to their own datatable within a dataset?
So one stored procedure would be basically the datasource for multipe datatables?
yes you can do that,the only thing is your datatables name in dataset will be Table1 table2 etc. which u can easily change using
dsMyDataset.Tables(0).TableName="MyTable1"
__________________
Rate the posts that helped you 
-
Jul 24th, 2008, 12:28 PM
#4
Thread Starter
Frenzied Member
Re: Multiple Selects in Stored Proc SQL 2000
so call it just like normal and expect more tables?
-
Jul 24th, 2008, 12:31 PM
#5
Re: Multiple Selects in Stored Proc SQL 2000
yes just call SPOC as
Code:
Dim dsMyDataSet As New DataSet("MySet")
Dim daSQL As New SqlDataAdapter("USP_SELECT_TABLE", "Connection")
daSQL.SelectCommand.CommandType = CommandType.StoredProcedure
daSQL.Fill(dsMyDataSet)
__________________
Rate the posts that helped you 
-
Jul 24th, 2008, 12:32 PM
#6
Thread Starter
Frenzied Member
Re: Multiple Selects in Stored Proc SQL 2000
Thanks alot... that's way too easy. :P
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|