Results 1 to 5 of 5

Thread: how to change it?

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    India
    Posts
    50

    how to change it?

    hai all

    i don't want to fix the server name while creating a setup for the client application which uses DCOM.

    i want to give it runtime while running the client application. Based on the given name, my client application should get the reference from that server.

    is there any way?

  2. #2
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463
    There is a way to do this but it's not that simple.

    Using the following Code will allow you to late-bind a reference to an object from a selected Server at Runtime.

    Code:
    Dim svrObj as Object
    
    Set svrObject = CreateObject("ObjectName.ClassName","ServerName")
    The downside to this is that the Object you reference MUST be part of COM+ package and referenced as such on each of the Servers otherwise the Late-Bind will not find the object.

    Peeman.

    Best Bar.....

  3. #3
    Junior Member
    Join Date
    Feb 2003
    Posts
    16

    Re: how to change it?

    Originally posted by needhelp
    hai all

    i don't want to fix the server name while creating a setup for the client application which uses DCOM.

    i want to give it runtime while running the client application. Based on the given name, my client application should get the reference from that server.

    is there any way?
    Wouldn't you have to execute clireg32.exe on .vbr and .tlb files everytime you switch server name?

  4. #4

    Thread Starter
    Member
    Join Date
    Dec 2002
    Location
    India
    Posts
    50
    hai fatboypee and bynature,

    thank you for your help. but the problem is i am using the developed code and so i cannot change the code right now.

    so i need a custom setup which asks for servername if it was changed. user will enter the new servername, then automatically that client should connect to the new server.

    is it possible to write that sort of program in VB?

    looking for your valuable help.....

  5. #5
    Hyperactive Member FATBOYPEE's Avatar
    Join Date
    May 2001
    Location
    Charleville (Ireland) Still. ANYONE GOT A JOB I CAN HAVE ? GIZA JOB. I CAN DO THAT....
    Posts
    463
    I'm not sure that can be done as the reference will have been compiled into the EXE before deployment and an implicit link made between DCOM Server & App.

    Peeman

    Best Bar.....

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