我们正在将一些 Web 应用程序从 Microsoft Server 2003 迁移到 2008,而这一功能似乎无法正常工作,因为它通常填充的字段是空的。这是代码:
function get_name(emp_nbr)
sql3 = "select LTRIM(RTRIM(INITCAP(COMMON_NAME))) COMMON_NAME, LTRIM(RTRIM(INITCAP(LAST_NAME))) last_name from (select EMPLOYEE_NBR,COMMON_NAME, LAST_NAME from hrit_admin.employee union all select CONTRACT_RESOURCE_ID, COMMON_NAME, LAST_NAME from hrit_admin.contract_resource) a where EMPLOYEE_NBR = a.EMPLOYEE_NBR and EMPLOYEE_NBRr = " & emp_nbr
rs3.open sql3,conn
get_name = rs3("COMMON_NAME") & " " & rs3("LAST_NAME")
rs3.close
end function
任何帮助将不胜感激。