Hi guys,
I hope you can help as I am out of options.
I am trying to copy a DB from one server to other. Along the line I get an error:
Microsoft SQL-DMO (ODBC SQLSate: 42S02)
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid Object Name 'dbo.fx_get_role_from_userid'

I tried recreating the Function on both Servers and I still get this error. Here is the Function:
create function dbo.fx_get_role_from_ownerid
(
@ownerid varchar(9)
)
returns varchar(15)
as
begin
declare @role varchar(15);
select @role = role from vw_sec_security
where employeeid = @ownerid;
return @role;
end

And here is the View:
CREATE view dbo.vw_sec_security
as
select
s.systemid,
h.employeeid,
s.uid,
s.pwd,
p.region,
p.zone,
p.title,
h.firstname + ' ' + h.lastname username,
s.role,
p.xstamp dt_pwd,
h.email,
h.phone,
h.busphone,
h.mobilephone
--will replace this subquery with a reference to tbl_hr_ecinfo
from
tbl_sec_staff s,
tbl_hr_empinfo h,
tbl_sec_profile p
where
s.systemid = h.systemid
and s.systemid = p.systemid
and p.inactive = 0

What could this be?