oracle里的空字符串是null吗?

http://stackoverflow.com/questions/203493/why-does-oracle-9i-treat-an-empty-string-as-null

再看我们的数据库,都是varchar2类型的,默认值是‘ ’(有空格),但又是nullable的。所以再要排除空记录(包括空值和默认值),应该是

XXX is not null and xxxx <> ‘ ’(有空格) 或者 nvl(xxx,‘ ’)<> ‘ ’

后则写起来简单一些。

update:

经试验,这种做法比较简洁(必较即要判断 is null,又要判断一个空格的做法)

trim(XXX) is null

当XXX是空格或是null值(空串)的时候都成立

不为空就则改成is not null

比如

select  sop_destination_warehouse from SALES_ORDER_HEADERS where trim(sop_destination_warehouse) is null 返回的是sop_destination_warehouse为空的记录

select  sop_destination_warehouse from SALES_ORDER_HEADERS where trim(sop_destination_warehouse) is  not null 返回的是sop_destination_warehouse有值的记录。

另:安装ODP.net可以解决System.Data.OracleClient   requires   Oracle   client   software   version   8.1.7   or   greater.的错误。并且,要给予aspnet账号(iis5.1,其他版本看具体服务进程的用户)oracle client目录读写权限。

WPF框架对象的生命周期

所谓框架对象–WPF framework-level element (those objects deriving from either FrameworkElement or FrameworkContentElement)

的生命周期见这里

值得注意的是Initialized事件的顺序在树(包括视觉树和逻辑树)的顺序是不确定的。而loaded事件居然是从父到子的。

The mechanism by which the Loaded event is raised is different than Initialized. The Initialized event is raised element by element, without a direct coordination by a completed element tree. By contrast, the Loaded event is raised as a coordinated effort throughout the entire element tree (specifically, the logical tree). When all elements in the tree are in a state where they are considered loaded, the Loaded event is first raised on the root element. The Loaded event is then raised successively on each child element.

IDE啊

今天浪费了半天时间debug.原因就是断点设得不对。对错误的范围做了错误的假设,甚至开始怀疑一些很基本的知识。结果最后发现是自己写的一段代码改了变量的值。当然这也是自己基础不坚实。还有就是经验不足没想到自己在page里写的代码改了ascx里的值。但如果Visual  Studio能够有很好的Code  Analysis的能力的话,也不会漏掉。就类似Reflector的Code  Analyze(Depends on和UsedBy)的功能。VS2005怎么就没有呢?(虽然菜单里也有Find  references的功能,但那个从来就太弱了)希望2008能有更大的进步。