I'm working in an Access 07 project tied to a sql server db. In my continuing effort to optimize application performance I would like to know which is better at returning just a simple value for a variable: a view, stored proc, or function? Here are two examples:
The first example is already aggregating against a view and the second is against a table. All three work but I'm trying to figure out which is the best in this scenario. I understand the basic differences between all three but sometimes I have difficulty figuring out which one to use when one or more can return the results I need. Thanks!
Code:
sngDiscCredits = Nz(DSum("Credit_Grade", "vwStdDiscClassCreditsCourses", "StdDegReqDiscId = " & lngDiscId)) or sngDiscCreditMin = DSum("CreditMin", "StdDegReqClass", "StdDegReqDiscId = " & lngDiscId)
Comment