It would kinda help if you show us the code that doesn't work...
What error does it give? If it's a permissions problem, the error is very specific.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability