SQL语句执行的问题
if((select COUNT(*) from MembershipCard where ClientNum=(select ClientNum from Client where ClientName='@ClientName')) <>0)begin
SELECT Client.ClientName,MemType.MemTypeTitle,LimitUsers.LimitTitle,LimitUsers.GroupID,LimitGroups.GroupName
FROM Client INNER JOIN MemType ON Client.MemTypeNum=MemType.MemTypeNum
FULL OUTER JOIN MembershipCard ON Client.ClientNum=MembershipCard.ClientNum
INNER JOIN LimitUsers ON LimitUsers.LimitNum=Client.LimitNum
INNER JOIN LimitGroups ON LimitGroups.GroupID=LimitUsers.GroupID
WHERE Client.ClientName='@ClientName' AND MembershipCard.ConsumerPwd='@ClientPwd'
end
else
begin
SELECT Client.ClientName,MemType.MemTypeTitle,LimitUsers.LimitTitle,LimitUsers.GroupID,LimitGroups.GroupName
FROM Client INNER JOIN MemType ON Client.MemTypeNum=MemType.MemTypeNum
INNER JOIN LimitUsers ON LimitUsers.LimitNum=Client.LimitNum
INNER JOIN LimitGroups ON LimitGroups.GroupID=LimitUsers.GroupID
WHERE Client.ClientName='@ClientName'
end
这个语句在SQL管理器中执行有数据行返回,但在C#中执行时没有任何数据返回,不知道怎么回事?哪位大侠给解释下。。。