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.

.net - What is the point of DBNull? -


in .net there null reference, used everywhere denote object reference empty, , there dbnull, used database drivers (and few others) denote... pretty same thing. naturally, creates lot of confusion , conversion routines have churned out, etc.

so why did original .net authors decide make this? me makes no sense. documentation makes no sense either:

the dbnull class represents nonexistent value. in database, example, column in row of table might not contain data whatsoever. is, column considered not exist @ instead of merely not having value. dbnull object represents nonexistent column. additionally, com interop uses dbnull class distinguish between vt_null variant, indicates nonexistent value, , vt_empty variant, indicates unspecified value.

what's crap "column not existing"? column exists, doesn't have value particular row. if didn't exist, i'd exception trying access specific cell, not dbnull! can understand need differentiate between vt_null , vt_empty, why not make comempty class instead? neater fit in whole .net framework.

am missing something? can shed light why dbnull invented , problems helps solve?

the point in situations there difference between database value being null , .net null.

for example. if using executescalar (which returns first column of first row in result set) , null means sql executed did not return values. if dbnull means value returned sql , null. need able tell difference.


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 -