|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DCOM or ?following: Computer A is a database server running a Sybase database Computer B is our IIS server. It doesn't have any Sybase drivers installed Both computers are actually located next to each other in the same room. I need to create an asp page on computer B that reads the database on computer A. So far I've written a com dll and registered it on the database server. This dll returns a formatted html string that works just fine. I have an asp page on computer B that I want to call the dll and get the return string so I can write it out. Something like <% Dim o Set o = Server.CreateObject("Mydll.MyData") Response.Write o.GetMyData %> Obviously the CreateObject call fails because the object is located remotely. Anyone have a simple example of how to call the object remotely? I've queried Google but I'm getting nowhere. Thanks in advance, Jim Edgar "Jim Edgar @cox.net>" <djedgar<removethis> wrote in message Then you need to tell the [IIS] machine where to fnd it.news:uzxq%23nuZFHA.1412@TK2MSFTNGP12.phx.gbl... .. . . > Obviously the CreateObject call fails because the object is > located remotely. When you build your [D]COM component, select the "Remote Server Files" option (in the Project Properties). This creates additional VBR and TLB files along with your DLL (you may or may not need the TLB; it depends on whether your DLL exposes any complex Types). Also, make sure you have Binary Compatibility set (Project Properties, Component Tab). The linkage from DCOM "client" to "server" works on GUID's and, if you don't use Compatibility, the link will break every single time you recompile the DLL. Take the VBR to the IIS machine and run clireg32.exe on it (you'll probably have to take a copy of /that/ along as well; it's buried inside the Visual Basic installation somewhere). This utility takes the information in the VBR file and sets the mahine up so that it knows the DLL exists on A.N.Other machine (this is one of the things the CliReg will ask you). HTH, Phill W.
Show quote
Hide quote
> . . . Thanks Phill. This seems pretty straight forward. I'll give it a try this> > Obviously the CreateObject call fails because the object is > > located remotely. > > Then you need to tell the [IIS] machine where to fnd it. > > When you build your [D]COM component, select the "Remote > Server Files" option (in the Project Properties). This creates > additional VBR and TLB files along with your DLL (you may > or may not need the TLB; it depends on whether your DLL > exposes any complex Types). > Also, make sure you have Binary Compatibility set (Project > Properties, Component Tab). The linkage from DCOM > "client" to "server" works on GUID's and, if you don't use > Compatibility, the link will break every single time you recompile > the DLL. > > Take the VBR to the IIS machine and run clireg32.exe on it > (you'll probably have to take a copy of /that/ along as well; it's > buried inside the Visual Basic installation somewhere). > This utility takes the information in the VBR file and sets the > mahine up so that it knows the DLL exists on A.N.Other > machine (this is one of the things the CliReg will ask you). > > HTH, > Phill W. > > weekend. Jim Edgar |
|||||||||||||||||||||||