dbTalk Databases Forums  

Who to make a DLL in Visual Basic.Net to use as a User Defined Function. (UDF)

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


Discuss Who to make a DLL in Visual Basic.Net to use as a User Defined Function. (UDF) in the microsoft.public.sqlserver.olap forum.



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

Default Who to make a DLL in Visual Basic.Net to use as a User Defined Function. (UDF) - 10-17-2003 , 01:03 PM






Who to make a DLL in Visual Basic.Net to use as a User
Defined Function. (UDF)?

I create a new Class Library project and then a new Com
Class and put a function inside, compile the project and
when I try to register in OLAP the following error occurs:
Unable to add library reference xxxxxxxxx the file
contains no libraries.

I did it with Visual Basic 6.0 successfully but now I want
to use VB.Net 2003

Reply With Quote
  #2  
Old   
Wei Zhang [MSFT]
 
Posts: n/a

Default RE: Who to make a DLL in Visual Basic.Net to use as a User Defined Function. (UDF) - 10-17-2003 , 04:21 PM






Were you registering the dll with Analysis Manager? If so, this is a known
bug about failing to register UDF (in VS.Net) by Analysis Manager.

Here is the workaround you can try:
(1) Write a function with <ComClass> attribute
(2) Build with "Register for COM Interop"
(3) If move the dll/tlb from one machine to another, use RegAsm to register
the dll at new location.
Example C:\> regasm g:\udftest\classlibr ary1.dll
/tlb:g:\udftest\classlibrary.tlb /codebase
(4) With MDX Sample Application:
USE LIBRARY "D:\share\ClassLibrary1\ClassLibrary1\bin\ClassLib rary1.tlb"

Thanks

Wei Zhang
Microsoft OLAP PSS
This posting is provided "AS IS" with no warranties, and confers no rights.


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.