Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 Reporting Services Development
 Running SELECT Query and Sprocs same dataset

Author  Topic 

tash4206
Starting Member

7 Posts

Posted - 2008-03-27 : 19:55:48
Is this possible to do this SSRS 2005? In the dataset command mode; would it be possible to write a Transact-SQL statements and also execute a stored procedure from the same dataset. eg.

Command Type Text in the dataset TAB:

SELECT * FROM Employees ---returns dataset to the .rdl populates the table control

EXEC dbo.insert_into_table_Sproc[/b] --some other task without returing any data (parameter is passed to this SPROC)

Thanks in advance.

-Tari

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-28 : 03:57:46
Yup. Its possible. You can use direct SELECT or call an SP with Exec in command type text and if you're going for command type procedure you just need to give procedure name without EXEC and param values
Go to Top of Page

tash4206
Starting Member

7 Posts

Posted - 2008-03-28 : 10:07:43
"...You can use direct SELECT or call an SP with Exec in command type text .."


BUT can you do BOTH in a command type TEXT same dataset?? I don't want to write stored procs for the select statement(too many reports and they are simple SELECTs). What I want to accomplish is that the SELECT would return a dataset for my controls... and the EXEC would execute a reusable SPROC by passing parameters into it. This sproc basically inserts a record into a log file table in the database every time the dataset is run. Thanks!
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-03-28 : 13:53:43
Nope. Unfortunately you cant do both on same dataset.
Go to Top of Page
   

- Advertisement -