Showing posts with label dll. Show all posts
Showing posts with label dll. Show all posts

Thursday, March 22, 2012

Class not registered error while using Stored procedure

Hi,

I had registered a COM DLL (CogUdf32.dll) as Assembly under the Adventure Works DW.

When i tried executing a method from it through MDX query:

SELECT

{ FILTER([Customer].[Customer].AllMembers, CogUdf32.CogInStr([Customer].[Customer].CurrentMember.Name,"USA") > 0) }

ON AXIS(0)

FROM [Adventure Works];

I am getting following error:

The following system error occurred: Class not registered .

Any pointers are welcome.

Thanks and Regards,
Santosh.

COM UDF's are turned off by default due to the security concerns.

It is better practice and it is safer to write your UDF's in .NET language and compile them as assemblies. But if you still need your COM UDF go to the "SQL Surface Area Configuration" tool avaliable through the start menu shortcut and enable COM UDF for Analysis Services.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

|||

MY UDF's are written in .NET language. I am able to add them as COM DLL under Assemblies. But when i try to use the functions, i am getting these errors:

MDX:
SELECT
{ FILTER([Measures].[Sales Amount], CogUdf32.CogInStr([Measures].[Sales Amount],"*", 0) > 0) }
ON AXIS(0)
FROM [Adventure Works]

Error: The following system error occurred: Class not registered .

MDX:
SELECT
{ FILTER([Measures].[Sales Amount], CogUdf32.CCogRExp.CogInStr([Measures].[Sales Amount],"*", 0) > 0) }
ON AXIS(0)
FROM [Adventure Works]

Error: Query (2, 37) The '[CogUdf32].[CCogRExp].[CogInStr]' function does not exist.

Is there any method to find the registered classes/functions for the Assemblies added in Analysis Service.

Class for DDL

I want to create, alter and delete tables (not records) from ASP code. Does
anybody know of a class (preferably ASP or DLL) that hides the complexity of
the Data Definition Language?
CedricTake a look at the DMO API. However, first consider your reasons for wanting
to do this. DMO is a reasonable choice if you want to retrieve info about DB
objects or if you are developing a general-purpose database utility
(something like Enterprise Manager for example). For deployment of a
database application however, TSQL DDL is far more concise and much easier
to deploy in most environments.
At runtime, in a business process application, there should of course be no
general need to create and change database objects at all. Not if you have
the correct design anyway.
Hope this helps.
David Portas
SQL Server MVP
--|||Look at SQL-DMO in Books Online.
Paul
"Cedric" wrote:

> I want to create, alter and delete tables (not records) from ASP code. Doe
s
> anybody know of a class (preferably ASP or DLL) that hides the complexity
of
> the Data Definition Language?
> Cedric
>
>|||>I want to create, alter and delete tables (not records) from ASP code
Now I re-read that I am pretty alarmed! Why would you want to alter and
delete tables from ASP? Are you really writing a replacement for Enterprise
Manager? If so, you should first take a look at some of the similar third
party tools already available.
David Portas
SQL Server MVP
--