既然为空不可以,你就改一下这句代码
cmd.CommandText = "Select distinct 来源类别,来源单号,产品编码 From 返工单 a where a.sys_Over = 0 and 来源单号 is not null"