Click here to Skip to main content
15,561,817 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
im taking boolean value from data base i want show it active and inactive...

please help me friends..

1 solution

The easiest way to to do it via the SQL statement:
SELECT CASE WHEN activeStatus = 0 THEN 'Inactive' ELSE 'Active' END FROM MyTable
Or better use a separate table for the legends and use a JOIN in your SQL.
Share this answer
Immy77 25-May-15 2:58am    
OriginalGriff 25-May-15 3:13am    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900