我有以下带有SQL表达式的VB.NET代码:
SELECT
Period,
EmOrg,
ROUND(Sum(Total_H),2) As GrandTotal,
ROUND(Sum(FTE_O),1) As Division
FROM(
SELECT
LD.Period,
LD.EmOrg,
Sum(LD.RegHrs) AS 'Total_H',
Sum(LD.RegHrs)/176 AS 'FTE_O'
FROM SSI.dbo.LD LD
WHERE (LD.EmType In ('C','T','U')) AND (LD.EmOrg Like '%T00')
GROUP BY LD.Period, LD.EmOrg
UNION
SELECT
LD.Period,
LD.EmOrg,
Sum(LD.RegHrs) AS 'Total_H',
Sum(LD.RegHrs)/198 AS 'FTE_O'
FROM SSI.dbo.LD LD
WHERE (LD.EmType='S') AND (LD.EmOrg Like '%T00')
GROUP BY LD.Period, LD.EmOrg)AS counts
GROUP BY Period, EmOrg
如何隐藏最终用户使用代码功能的代码,但不能编辑或更改代码中使用的值。
如果这是VB.NET,我会使用(例如)Button1.Enabled = False这会取消激活该按钮 那么在SQL中我该怎么做才能从用户那里隐藏这段代码呢?
答案 0 :(得分:0)
加密此代码并不能真正保护您,因为它会构成某种DRM。
隐藏代码的最佳方法是将其放在具有严格访问条件的(虚拟?)服务器上,并使该功能仅通过例如一个网络服务。