![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi NG im trying to write a dll file to be used with an action. Say i want this C# function to be exposed to mdx (really complicated business logic here...): public int Add(int x, int y) { return (x+y); } Had this been an old fashion dll, written in VB6, i could register it with regsvr32.exe and then use it straight away. But how do i do the same thing with .net libraries? Ive tried to register with regasm.exe, after compiling to a dll library, but no luck. While the registration works fine, the mdx builder returns "unable to add library reference c:\libtest\test.dll. The file contains no libraries" what am i dooing wrong here? btw this might be the wrong forum, but i thought that someone else might have tried the same with analysis services and thus might have found a solution ![]() -Kasper |
#3
| |||
| |||
|
|
You are not doing anything wrong. This is a known problem with .NET being called as a UDF. Until Yukon your UDFs need to be written in Visual Studio 6 with native COM. We cannot use COM interop directly from AS. This is being addressed in SQL Server 2005 where we support .NET everywhere. A solution which has been proposed (but I haven't personally validated) is to write a VB6 wrapper. Have AS call out to VB6 -- which then uses COM interop to the real UDF. I don't know if that will work, but you might give it a try. If you try this, please drop me a line. I'd love to see it works. -- Dave Wickert [MSFT] dwickert (AT) online (DOT) microsoft.com Program Manager BI SystemsTeam SQL BI Product Unit (Analysis Services) -- This posting is provided "AS IS" with no warranties, and confers no rights. "Kasper Birch Olsen" <kasper (AT) nospam (DOT) com> wrote in message news:uEuSzdekFHA.3580 (AT) TK2MSFTNGP09 (DOT) phx.gbl... Hi NG im trying to write a dll file to be used with an action. Say i want this C# function to be exposed to mdx (really complicated business logic here...): public int Add(int x, int y) { return (x+y); } Had this been an old fashion dll, written in VB6, i could register it with regsvr32.exe and then use it straight away. But how do i do the same thing with .net libraries? Ive tried to register with regasm.exe, after compiling to a dll library, but no luck. While the registration works fine, the mdx builder returns "unable to add library reference c:\libtest\test.dll. The file contains no libraries" what am i dooing wrong here? btw this might be the wrong forum, but i thought that someone else might have tried the same with analysis services and thus might have found a solution ![]() -Kasper |
![]() |
| Thread Tools | |
| Display Modes | |
| |