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.

mysql - SELECT-ing data from stored procedures -


i have complicated select query filters on time range, , want time range (start , end dates) specifiable using user-supplied parameters. can use stored procedure this, , return multiple-row result set. problem i'm having how deal result set afterwards. can't like:

select * (call stored_procedure(start_time, end_time)) 

even though stored procedure select takes parameters. server-side prepared statement don't work (and they're not persistent either). suggest using temporary tables; reason that's not ideal solution 1) don't want specify table schema , seems have to, , 2) lifetime of temporary table limited invocation of query, doesn't need persist beyond that.

so recap, want persistent prepared statement server-side, return result set mysql can manipulate if subquery. ideas? thanks.

by way, i'm using mysql 5.0. know it's pretty old version, feature doesn't seem exist in more recent version. i'm not sure whether select-ing stored procedure possible in other sql engines; switching not option @ moment, i'd know whether it's possible anyway, in case decide switch in future.

selecting functions possible in other engines. instance, oracle allows write function returns table of user defined type. can define result sets in function, fill them using queries or using combination of selects , code. eventually, result set can returned function, , can continue query on using:

select * table(functiontobecalls(parameters)); 

the disadvantage, result set not indexed, might slow if function used within complex query.

in mysql nothing possible. there no way use result set procedure directly in select query. can return single values function , can use out or inout parameters procedure return values from. entire result sets not possible. filling temporary table within procedure closest get.


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 -