473,320 Members | 1,948 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,320 software developers and data experts.

SqlDataSource and multiple recordsets

Hi all,

Could I use the sqldatasource with stored-procedure to return multiple
recordset? I did not want to have any sqldatasourec in the one page just to
return the record back to dropdownlists. In my stored procedure will have 2
select statement. If it can be done how I refer to each dropdownlist to
correct recordset. Please advise. Thanks.
Jul 24 '07 #1
4 6101
The SqlDataSource is a piece of software that wraps all functionality in one
convenient wrapper. Underneath the hood it contains all of the plumbing to
make simple drag and drop and configure a reality. In .NET, you use multiple
SqlDataSource controls to complete multiple steps. You might be able to
kludge this, but I am not sure it is worth it. If you want to go this route,
you can try concatenating multiple SQL statements, but I am not sure how you
would separate out the many tables. But, I have not dug deeply into the
SqlDataSource.

If you need to step outside of this box, you should learn about the
underlying objects and code you own data access.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Madison" <Ma*****@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
Hi all,

Could I use the sqldatasource with stored-procedure to return multiple
recordset? I did not want to have any sqldatasourec in the one page just
to
return the record back to dropdownlists. In my stored procedure will have
2
select statement. If it can be done how I refer to each dropdownlist to
correct recordset. Please advise. Thanks.

Jul 24 '07 #2
From what I've read the SqlDataSource works with 1 table only. A
dataset can be filled with multiple tables from your stored procedure,
though.

From here http://forums.asp.net/t/1021356.aspx:

"I think everybody is half-correct here.

If you want a SqlDataSource, you would need one for each table. Not
sure why that is a big deal.

But you *can* issue multiple unrelated selects in a single stored proc
and load them into a DataSet and reference them by table."

Madison wrote:
Hi all,

Could I use the sqldatasource with stored-procedure to return multiple
recordset? I did not want to have any sqldatasourec in the one page just to
return the record back to dropdownlists. In my stored procedure will have 2
select statement. If it can be done how I refer to each dropdownlist to
correct recordset. Please advise. Thanks.
Jul 24 '07 #3
Thanks for your quick reply.

I have been using dataset to do most of it. Do you think with multiple
SqlDataSource call it will ok? Because I read about how to handle the
connection most the time they recommanded not to do that. I will end up to
have about 5-6 trips to fill the dropdowlist.

"Cowboy (Gregory A. Beamer)" wrote:
The SqlDataSource is a piece of software that wraps all functionality in one
convenient wrapper. Underneath the hood it contains all of the plumbing to
make simple drag and drop and configure a reality. In .NET, you use multiple
SqlDataSource controls to complete multiple steps. You might be able to
kludge this, but I am not sure it is worth it. If you want to go this route,
you can try concatenating multiple SQL statements, but I am not sure how you
would separate out the many tables. But, I have not dug deeply into the
SqlDataSource.

If you need to step outside of this box, you should learn about the
underlying objects and code you own data access.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Madison" <Ma*****@discussions.microsoft.comwrote in message
news:30**********************************@microsof t.com...
Hi all,

Could I use the sqldatasource with stored-procedure to return multiple
recordset? I did not want to have any sqldatasourec in the one page just
to
return the record back to dropdownlists. In my stored procedure will have
2
select statement. If it can be done how I refer to each dropdownlist to
correct recordset. Please advise. Thanks.


Jul 24 '07 #4
Sorry about the EW comment. I thought I was still in the Expression Web
group. The rest of the post applies.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

************************************************
Think outside the box!
************************************************
"Madison" <Ma*****@discussions.microsoft.comwrote in message
news:DA**********************************@microsof t.com...
Thanks for your quick reply.

I have been using dataset to do most of it. Do you think with multiple
SqlDataSource call it will ok? Because I read about how to handle the
connection most the time they recommanded not to do that. I will end up to
have about 5-6 trips to fill the dropdowlist.

"Cowboy (Gregory A. Beamer)" wrote:
>The SqlDataSource is a piece of software that wraps all functionality in
one
convenient wrapper. Underneath the hood it contains all of the plumbing
to
make simple drag and drop and configure a reality. In .NET, you use
multiple
SqlDataSource controls to complete multiple steps. You might be able to
kludge this, but I am not sure it is worth it. If you want to go this
route,
you can try concatenating multiple SQL statements, but I am not sure how
you
would separate out the many tables. But, I have not dug deeply into the
SqlDataSource.

If you need to step outside of this box, you should learn about the
underlying objects and code you own data access.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)

*********************************************** *
Think outside the box!
*********************************************** *
"Madison" <Ma*****@discussions.microsoft.comwrote in message
news:30**********************************@microso ft.com...
Hi all,

Could I use the sqldatasource with stored-procedure to return multiple
recordset? I did not want to have any sqldatasourec in the one page
just
to
return the record back to dropdownlists. In my stored procedure will
have
2
select statement. If it can be done how I refer to each dropdownlist to
correct recordset. Please advise. Thanks.



Jul 24 '07 #5

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

Similar topics

7
by: (Pete Cresswell) | last post by:
I posted this in the MS Access group, but no luck. ------------------------------------------ I've got another stored procedure in the same app that returns multiple recordsets and the code works....
0
by: Jason Shohet | last post by:
I'm using the new SqlDataSource with the beta. Below I have my code: asp:SqlDataSource ID="ds" Runat="server" SelectCommand="SELECT employee_ssno, firstname, lastname FROM employee_temp order by...
12
by: Scott | last post by:
Front-end Access 2000 I have a stored procedure that has 2 parameters BusinessUnitID and Year. It returns multiple record sets (5 to be exact). I thought I could use a Pass through query but...
16
by: Randy Harris | last post by:
I was inspired by the recent discussion of returning multiple recordsets to ADO from a stored procedure. (Amazed is probably more accurate). I asked about how to accomplish same with Oracle and...
0
by: nachiket2k2 | last post by:
Hi, I am using VB 6.0, ADO 2.0 with MS Access 2000 Database. in a vb form, i need to fatch data from 3 different tables (ABC.MDB). it will be a tedious job if i create 3 connections with 3...
0
by: Nam | last post by:
I want to use the same sqlDataSource for two CheckBoxList controls in ASP.NET 2.0. For simplicity, I am using the case of only two CheckBoxList controls in the following example: My...
2
by: Ned Balzer | last post by:
I'm trying to create a formview bound to a sqldatasource, and use a stored procedure to insert data from the formview into several tables. I have some simplified code below, the real code is much...
4
by: msch-prv | last post by:
I use an Access db in my application. So far I have been exclusively working wtih the AccessDataSource controls to hook up to the db. I know that Access db connections can also be established with...
0
by: suganya | last post by:
Hi I have a GridView in my Page. I have to bind multiple tables into the GridView using SQLDataSource. For that I have given the coding as <asp:GridView ID="Search_GridView" runat="server"...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.