Click to See Complete Forum and Search --> : COM, DCOM, dll?
wernerh
May 17th, 2002, 05:16 AM
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!
vkumar
May 17th, 2002, 06:12 AM
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..
wernerh
May 17th, 2002, 08:09 AM
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?
wernerh
May 17th, 2002, 08:18 AM
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?
vkumar
May 17th, 2002, 08:46 AM
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...
wernerh
May 18th, 2002, 03:28 AM
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??
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.