Monday, March 12, 2012
How to use multiple recordsets from a stored procedure?
stored procedure returns 3 recordsets. I need to print all of these 3
recordsets onto the report.
Are there any way to print these 3 recordsets onto this report without
splitting this stored procedure into 3 stored procedures?
Thanks a lot.No, RS only supports one recordset being returned.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"BF" <BF@.discussions.microsoft.com> wrote in message
news:71BD33B4-2B04-4188-9814-8360BED57B87@.microsoft.com...
>I have one stored procedure which has 3 select statements inside it. So
>this
> stored procedure returns 3 recordsets. I need to print all of these 3
> recordsets onto the report.
> Are there any way to print these 3 recordsets onto this report without
> splitting this stored procedure into 3 stored procedures?
> Thanks a lot.
>
How to use Joins in SQL statements in .aspx page?
Hi can someone help me?
I'm using Access database and Microsoft VS2005 (VB)
I need to take data from 2 different tables in 1 database. But i can't seems to get it right!
I have:
- dbWarehouse.mdb
- tblReadDetails and tblStock
I need to use "Barcode" from tblReadDetails, compare it with "Barcode" in tblStock then retrieve all the column in tblStock and put it in a webpage.aspx list box.
I tried the following code...
cn.ConnectionString = strConn
cn.Open()
cmd =New OleDbCommand("SELECT tblStock.Barcode, tblStock.Item, tblStock.Dept, tblReadDetails.Barcode FROM tblStock JOIN tblReadDetils WHERE tblReadDetails.Barcode = tblStock.Barcode", cn)
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
While dr.Read()
lstBarcode.Items.Add(dr2.Item("tblStock.Barcode"))
lstItem.Items.Add(dr2.Item("tblStock.Item"))
lstDept.Items.Add(dr2.Item("tblStock.Dept"))
EndWhile
but it prompt me the following error...
OleDbException was unhandled by user code
Syntax error in FROM clause
What's wrong with this code?
Regards and thanks!
Hi rinaxanir,
Try this:
SELECT tblStock.Barcode, tblStock.Item, tblStock.DeptFROM tblStockINNERJOIN tblReadDetailsON tblStock.Barcode = tblReadDetails.Barcode
Hope this helps,
Adam
|||Thanks Adam!
It's perfect!
Rina