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

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

android - Keyboard hides my half of edit-text and button below it even in scroll view -