Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass parameters to a view from a calling stored procedure

Status
Not open for further replies.

Mirak

Programmer
Aug 1, 2001
28
0
0
Hi,

How can I pass optional parameters to a view when it is called from a stored procedure. Basically I want the recordset from the view to be filtered based on criteria requested by the calling procedure. I do not want the view to return records that are not needed for my report. Furthermore, the view will be used in another view to produce records for the report eventually...The report will be designed in MS Access. Basically I already designed all the queries needed to run the report in MS Access, but with a view to optimize the use of bandwidth on our WAN, I am converting all our queries to views and stored procedures to be executed on the Server. As is commonly known, sometimes you need to create quite a number of queries to generate reports. I am now tasked with the duty of converting all these queries to stored procedures and views when applicable. Please for urgent assistance.
 
Views can't have parameters, but there is a kludge solution. Have the stored procedure update a table with just the parameter information. Then write the view and have it access the parameter through that table.
-Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top