SQL Server Performance

Call .Net DLL

Discussion in 'SQL Server 2005 General Developer Questions' started by dineshasanka, Jun 2, 2006.

  1. dineshasanka Moderator

    I am not able to call Dll which have written in .Net from SQL Server 2005.
    I can access VB 6 DLL. Am I missing some configuration.

    ----------------------------------------
    http://dineshasanka.blogspot.com/
  2. FrankKalis Moderator

  3. dineshasanka Moderator

    Yes it is enabled

    ----------------------------------------
    http://dineshasanka.blogspot.com/
  4. satya Moderator

    Any errors or information during the CALL procedure?

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
  5. dineshasanka Moderator

    It does not return any errors. it doesn't create any instance

    DECLARE @retVal int
    DECLARE @comHandle INT
    DECLARE @errorSource VARCHAR(8000)
    DECLARE @errorDescription VARCHAR(8000)
    Declare @DNSServerMSMQName varchar(100),@DNSServerIPAddress varchar(15),@DNSServerName varchar(150)


    DECLARE @RootDomain VARCHAR(100),@MSMQName varchar(150)
    declare @ServerIPAddress varchar(15)

    EXEC @retVal = sp_OACreate 'DnsTrigger.DnsAdapter', @comHandle OUTPUT
    IF (@retVal <> 0)
    BEGIN
    EXEC sp_OAGetErrorInfo @comHandle, @errorSource OUTPUT, @errorDescription OUTPUT
    END

    print @retVal

    it is returning -2146232576

    ----------------------------------------
    http://dineshasanka.blogspot.com/
  6. satya Moderator

    Check whether Mscoree.dll is registered, if so try unregistering and re-register again.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided �AS IS� with no rights for the sake of knowledge sharing.
  7. dineshasanka Moderator

    what that dll supposed to do

    ----------------------------------------
    http://dineshasanka.blogspot.com/
  8. letsgo121 New Member

    Hello,

    I also met the same error, when calling a .net com from SQLServer2005,
    using sp_OACreate, and the error code is -2146232576.

    would you give me a favour to tell me how to do?

    thanks


  9. satya Moderator

    Have you performed whatever suggested above?

    This behavior occurs if the Microsoft .NET Framework is not installed on the target computer. Applications and controls written for the .NET Framework require that it be installed on the computer on which the application or control runs.

    Satya SKJ
    Microsoft SQL Server MVP
    Contributing Editor & Forums Moderator
    http://www.SQL-Server-Performance.Com
    This posting is provided AS IS with no rights for the sake of knowledge sharing.
  10. dineshasanka Moderator

    quote:Originally posted by satya


    This behavior occurs if the Microsoft .NET Framework is not installed on the target computer.

    Well, I have installed Microsoft .Net in the Pc. but still this is failing.

    ----------------------------------------

  11. harleyathison New Member

    Hi,
    I don't think so that you missing someone.but if you are in confusion then get help from someone.ok



  12. satya Moderator

    Whats your answer supposed to be?
    This is not related to the question though!
  13. saqqara New Member

Share This Page