Unanswered Howto use COM objects in CLR. NET programs

  • Friday, August 11, 2006 9:34 AM
     
     

    hi,

    i have a vb.net progi which i want to run under sql server 2005 as CLR.

    the prob is that when i want to create the assembly in sql 2005 it says

    that the create of the Interop.FC_COM.dll (this is the COM interop object) failed.

    when i try to create the Interop.FC_COM.dll as an assembly in sql 2005 it fails because this dll is not follwing the structure of a CLR dll.

    i've heard somewhere that MS is not supporting COM objects under CLR directly. is that true?

     

    any comments welcome,

    thnx

All Replies

  • Friday, August 11, 2006 4:53 PM
     
     

    Permission set

    SAFE

    EXTERNAL_ACCESS

    UNSAFE

    Code Access Security

    Execute only

    Execute + access to external resources

    Unrestricted

    Programming model restrictions

    Yes

    Yes

    No restrictions

    Verifiability requirement

    Yes

    Yes

    No

    Ability to call native code

    No

    No

    Yes

     

    you should be able to call native code with UNSAFE.

  • Monday, August 14, 2006 12:44 PM
     
     

    hi derek,

    thank you for your reply. i have started to add the assembly to sql 2005 but it says

    "Create failed for SqlAssembly 'Inserter'. (Microsoft.SqlServer.Smo)

     

    Additional information:

          - an exception occured while executing a Transact SQL Statement or batch

            (Microsoft.SQLServer.ConnectionInfo)

            - Assembly 'interop.fc_com, version = 0.0.0.0, culture=neutral, publickeytoken=null' was not found in the

              SQL catalog (Microsoft SQL server error 66503

    -- End of error msg.

     

    interop.fc_com is the bridge to my COM dll FC_COM. It is referenced in the CLR.NET project .

    When i try to add this interop.fc_com dll (which is a 32-bit COM dll) as an assembly it fails with an invalid attribute 0x1003 (SQL Server, error 6215)