Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

Create parameterized VIEW in SQL Server 2008 -


can create parameterized view in sql server 2008.

or other alternative ?

try creating inline table-valued function. example:

create function dbo.fxnexample (@parameter1 integer) returns table return (     select field1, field2     sometable     field3 = @parameter1 )  -- call this, if it's table/view parameter select * dbo.fxnexample(1) 

if view execution plan select not see mention of function @ , show underlying tables being queried. means statistics on underlying tables used when generating execution plan query.

the thing avoid multi-statement table valued function underlying table statistics not used , can result in poor performance due poor execution plan.
example of avoid:

create function dbo.fxnexample (@parameter1 integer)     returns @results table(field1 varchar(10), field2 varchar(10)) begin     insert @results     select field1, field2     sometable     field3 = @parameter1      return end 

subtly different, potentially big differences in performance when function used in query.


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -