作者tstanly ()
看板Web_Design
標題[問題] 傻眼了...室友大家都無解
時間Thu Aug 2 03:06:28 2007
程式碼:
strSQL2 = "select count(*) from Order_detail where and account ='a' "
objcmd2 = New SqlCommand(strSQL2, objCon)
num = objcmd2.ExecuteNonQuery
if num =0 then ...... end if
傻眼的是
我在DB下SQL指令 就是上面那串
select count(*) from Order_detail where and account ='a'
顯示出有0筆
可是我卻跑步進去那個程式if內的動作
後來利用中斷點查
我的 num竟然是-1
????????
請大家幫我解惑吧
天阿...3點了....
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 125.232.8.164
※ 編輯: tstanly 來自: 125.232.8.164 (08/02 03:07)
※ 編輯: tstanly 來自: 125.232.8.164 (08/02 03:07)
推 kevin814:IF後面的BOOL判斷式不是要 == 嗎 O O? 08/02 13:56
推 tstanly:是 = 沒錯 08/02 20:16
推 sweetpotatoa:asp 是 "=" 08/03 00:43