r/ASPNET • u/tgujay • Jul 09 '13
ASP Classic App problem with new server and provider
Full page code here
This is a web app that is currently hosted on a Windows Server 2003 server and we are migrating it to a Server 2008 server as part of a move away from all of our Server 2003 servers. The current server uses the MSDAORA provider but as that is not supported in Server 2008 we are now using the oraOLEDB.Oracle provider and everything is fine except for a name field related to the get_name function and a related query.
Main problem area that I can see is this function here:
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_nbr = " & emp_nbr
rs3.open sql3,conn
get_name = rs3("COMMON_NAME") & " " & rs3("LAST_NAME")
rs3.close
end function
When I output the query in the function as dynamic sql I get this:
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_nbr =
Which obviously is having a problem with emp_nbr, it doesn't have a value for it and as such is outputting nothing and breaking a field that uses get_name.
Any and all help would be greatly appreciated.
View all comments
Show parent comment
1
u/[deleted] Jul 09 '13
So nothing still. Hm.
Try looking at other fields, get the record count, see if you can see other data in there. Mess around with that result set. Something is haywire with your driver it looks like, maybe there is a setting you need to set.