以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  [求助]SQLQuery显示checkbox的问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=45172)

--  作者:ifastudy
--  发布时间:2014/1/17 12:45:00
--  [求助]SQLQuery显示checkbox的问题
表是一个SQLQuery,使用sql语句fill内容
SQL="select A, case when B>0 then 1 else 0 end C from XX"
问题是C显示成0,1如何让其显示成checkbox?

--  作者:Bin
--  发布时间:2014/1/17 14:22:00
--  
试试这样
SQL="select A, cast(case when B>0 then 1 else 0 end as bit) C from XX"

--  作者:ifastudy
--  发布时间:2014/1/17 18:11:00
--  
果然可以,谢谢