c# - Null Table adapter value with if then statement -


i have vb.net program checks see if specific terminal has been used on last week. i'd use if statement send me results. if tableadapter empty (null) execute in program... right have:

me.1tableadapter.fill(me.swipercheck.1, dtstartdate, todayend)  if (me.swipercheck.1.count = 0)  msgbox ("it worked") 

here dataset query:

select        case when count(sterminal) = 0 null else count(sterminal) end terminal            swipe        (dtcreated between @startdate , @enddate) , (sterminal = 'swiper 1') 

however it's not working , know output "null" if output not null, program works correctly.

if want return no records when count 0 have this:

select        count(sterminal) terminal            swipe        (dtcreated between @startdate , @enddate) , (sterminal = 'swiper 1') having count(sterminal) > 0 

that should make orignial if work correctly.


Comments

Popular posts from this blog

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -