Results 1 to 6 of 6

Thread: COM, DCOM, dll?

  1. #1

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    Question COM, DCOM, dll?

    I have created a Dll in VB6 that contains most of my code to access my SQL database

    How can I register my dll on the SQL server machine, and make it available to ASP pages on the another machinel??

    I have seen something of component services manager in WIN2000 but I dont know what the hell is going on there!

    Pls help! I need to Implement in the next week!

  2. #2
    vkumar
    Guest
    Register your DLL in the SQL Server m/c the usual way
    regsvr32 xyz.dll

    Then in your asp page, which you say in on another m/c, whenever you create an object of a class present in your dll you say

    Set var = CreateObject(dllname.clsName,machinename)

    Thats abt it..

  3. #3

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    Unhappy

    I have tried using:
    Set var = Server.CreateObject(dllname.clsName,machinename)
    but I getthe following error:
    "Wrong number of arguments or invalid property assignment:'server.createobject'

    Any ideas?

  4. #4

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170

    Unhappy

    I have now changed it to just "Createobject":
    Set var = CreateObject(dllname.clsName,machinename)
    and now I get the following error:
    "ActiveX component cant create object: 'dllname.clsName'

    The component is definatly registered correctly on the remote machine!

    Do I need to set permissions or something?

  5. #5
    vkumar
    Guest
    You would need to do the following

    For the Dll which you are registering on the SQLServer m/c, before you do a Make, goto Project --> Properties, Components Tab and check the Remote Server Files option.
    Now, when you do a Make, along with the dll another file is created called dllname.vbr.
    This is a Remote Automation Registration file.
    Run this vbr file on the m/c where your asp code exists.

    Then do the Create Object.. It should work

    The VBR file would put the type library in the registry of the m/c where your asp code is looking for your dll...

  6. #6

    Thread Starter
    Addicted Member wernerh's Avatar
    Join Date
    Sep 2000
    Posts
    170
    Thank you vkumar!

    I have done all the above steps, but now I get a "Server Object" error!

    Do I need to set permissions?

    When I registered my .vbr file I used Clireg32, and Used the remote machine's IP address as the network address and the "ncacn_ip_tcp" as a protocol. Is this correct??

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width