Hi,
Lets say we have a form that displays time card entries based on the
calendar control date on the form. So the user clicks on a date and the
form filters the table where the time card entries come from to get you
proper data.
In access I would just filter the query(rewrite its qrydef) and I'd get
my answer.
My question is, what is the proper way of doing this in ADP and SQL
Server 2005. I could filter the data from the view on the form, but
that would be filtering on the front end(a lot of unused data will be
going over the pipes from the server as a result).
I was thinking of using the ALTER view statement to change the T-SQL of
the view...so depending on user selection it would be SELECT * from
vwNAME WHERE Date = FilterDate
FilterDate would be the result of the calendar control in access.
I was told this is not a correct way to do this? If so why not? I was
going to make an sproc that would have a parameter @FilterDate and
would run the above T-SQL code to alter the query.
The other thing I was thinking is since sproc results can't be updated
I would have to create my own show/filter and updates. So have an sproc
filter my data, then have another sproc update it?
Oh and I don't just need to view filtered data, I need to update it as
well.
Any help appreciated. I'm a newbe to SQL Server...still learning.
THanks