(3)改变数据在DBGrid中的显示:
select mobile2 as 电话,FNAME as 姓,LNAME as 名,
(case Limit when 2 then '管理员' else '普通用户' end) as 权限 from E_PEOPLE
以上语句在SQL Server 和 ORACLE中通过。在ACCESS中通不过。因为ACCESS的连接串用的Jet4.0 ,不能用SQLServer中的语法。
ACCESS(Jet4.0)中用:
'select mobile2 as 电话,FNAME as 姓,LNAME as 名,'+
' (iif(Limit=2, '+quotedstr('管理员')+','+QuotedStr('普通用户')+')) as 权限'
+' from E_PEOPLE';