dbTalk Databases Forums  

user defined function doesn't work -- please help!

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss user defined function doesn't work -- please help! in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
charles
 
Posts: n/a

Default user defined function doesn't work -- please help! - 12-22-2005 , 07:33 PM






Hi all,

I start to try define one user defined function called CumROR using C#
as follows:


namespace APA
{
public class APA
{
public Double CumROR()
{
return 100;
}
}
}


Then add it into assembly in server. try MDX get following message

The '[APA].[APA].[CumROR]' function does not exist.

Can any expert let me know what step I missed? I've used user defined
function in AS2K without any problem.


Charles


Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: user defined function doesn't work -- please help! - 12-22-2005 , 08:45 PM






do you use AS2000 or 2005?

"charles" <CharlesYY (AT) gmail (DOT) com> wrote

Quote:
Hi all,

I start to try define one user defined function called CumROR using C#
as follows:


namespace APA
{
public class APA
{
public Double CumROR()
{
return 100;
}
}
}


Then add it into assembly in server. try MDX get following message

The '[APA].[APA].[CumROR]' function does not exist.

Can any expert let me know what step I missed? I've used user defined
function in AS2K without any problem.


Charles




Reply With Quote
  #3  
Old   
charles
 
Posts: n/a

Default Re: user defined function doesn't work -- please help! - 12-22-2005 , 10:15 PM



AS2005!

Jéjé wrote:
Quote:
do you use AS2000 or 2005?

"charles" <CharlesYY (AT) gmail (DOT) com> wrote in message
news:1135301618.054693.141910 (AT) g43g2000cwa (DOT) googlegroups.com...
Hi all,

I start to try define one user defined function called CumROR using C#
as follows:


namespace APA
{
public class APA
{
public Double CumROR()
{
return 100;
}
}
}


Then add it into assembly in server. try MDX get following message

The '[APA].[APA].[CumROR]' function does not exist.

Can any expert let me know what step I missed? I've used user defined
function in AS2K without any problem.


Charles



Reply With Quote
  #4  
Old   
Jéjé
 
Posts: n/a

Default Re: user defined function doesn't work -- please help! - 12-22-2005 , 11:14 PM



have you try to call the procedure like:
<name>.[APA].[APA].[CumROR]

where <name> is the name (or alias) of the assembly on the server.
When you deploy the assembly on the server a name is asked, try to put this
name in front of the namespace.
because the same namespace can be found in 2 different assemblies, this name
allow you to sepcify which one you want to access.

"charles" <CharlesYY (AT) gmail (DOT) com> wrote

AS2005!

Jéjé wrote:
Quote:
do you use AS2000 or 2005?

"charles" <CharlesYY (AT) gmail (DOT) com> wrote in message
news:1135301618.054693.141910 (AT) g43g2000cwa (DOT) googlegroups.com...
Hi all,

I start to try define one user defined function called CumROR using C#
as follows:


namespace APA
{
public class APA
{
public Double CumROR()
{
return 100;
}
}
}


Then add it into assembly in server. try MDX get following message

The '[APA].[APA].[CumROR]' function does not exist.

Can any expert let me know what step I missed? I've used user defined
function in AS2K without any problem.


Charles




Reply With Quote
  #5  
Old   
charles
 
Posts: n/a

Default Re: user defined function doesn't work -- please help! - 12-22-2005 , 11:54 PM



Thank you very much for your help, It works! Merry Xmas and happy new
year!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.