Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Create Object problem

Posted on 2002-07-30
14
Medium Priority
?
199 Views
Last Modified: 2013-11-13
I have Nt Server and there i run the server side programe  which handles the database read write ( seperate functions). How can i execute those functions in my client computer.

any one with a complete example pls.

Myserver name is KGMSERVER
0
Comment
Question by:ackid32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +2
14 Comments
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187765
Maybe look into using WINSOCK
One event using WINSOCK is DataArrival
Get Client side program to send function name to server side program

Have a Select Case staement in your Server side program in the DataArrival event which calls functions

Select Case

 Case "Function1Called"
0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187770
At the following link there is an example of using WINSOCK for client server apps

http://www.dcs.napier.ac.uk/~bill/vb_winsock.htm
0
 
LVL 4

Expert Comment

by:gencross
ID: 7187774
Is this a COM component(DLL, EXE)?  If so, why not just register the component on the client machine, then you can use the public functions in it.

Please let me know if I am off base, or you need more information.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187776
You can also use DataArrival event in your client program to call those functions on your client computer.
For example I have a server program that talks to a client app on my client computer to give an alert.

The client app in the DataAriival event checks for a certain string like "ServerMalfunction"
and then it calls a function which plays a siren.wav file on my client computer
0
 
LVL 4

Expert Comment

by:Nazdor
ID: 7187884
Sounds like DCOM is going to be more usefull than Winsock - but it depends on where the client/server machines are located.

If on the same lan, go with DCOM (as mention by gencross), if over the internet, then you'll need Winsock.

There's not much point giving more detailed information until ackid32 gives us more information.

0
 
LVL 17

Expert Comment

by:Barry Cunney
ID: 7187900
Nazdor/gencross
Yes I agree if on same LAN - DCOM is good
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7188137
first you need to get vbr and tlb files for your client pc.
Just compile your activex component with remote files checked.
After that you need to use Clireg32 to register them.
And use createobject(”progid.classid”,”servername”) to access your object
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7188159
try this sample with all details :

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q161837

p.s you need to send a disconnected recordsets from server to client .

0
 

Author Comment

by:ackid32
ID: 7190029
Gencross,

Yes, how i register the component on the client machine? Please in Detail.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190473
for activex dll you need to run RegSvr32 with path to your dll
like : RegSvr32 c:\winnt\my.dll

for activex exe you need to dbl-click on it.

or you can use setup wizard for this job.



0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190599
p.s you don’t need to register the physical component on a client machine.
You need to register some information about server component on the client pc.


This article details a method that can be used to ensure that your client application correctly traps for and resolves error 429 at run-time if the ActiveX DLL is present on the machine but not correctly registered.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q173407

This article demonstrates how to use the CLIREG32.EXE utility to manually register remote Visual Basic components on the client machine.
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q194636
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190604
one more if you have an activex dll you need to use mts or com+ to host it.
0
 
LVL 4

Accepted Solution

by:
gencross earned 900 total points
ID: 7190870
Sorry I did not get back with you, I have been out...

ackid32,

rkot2000 is providing good information, although it is getting a little too complicated.

Register the component on the client machine using regsvr32 as rkot2000 stated above.  This is all that must be done to use the component on the client.

On the server you should use MTS (NT 4.0) or Component Services (Win 2000) to host the component.  This will make life much easier.  To do this in Win 2000 just open Component Services and follow the directions on installing a new package.  This will run the component in a separate process, allowing you to take it in and out of memory, for example if an error occurs in the component the only way to get it out of memory is to reboot the server if you don't use these.
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7190913
with mts or com+ you can create a client config.exe(application proxy)
this exe can configure client pc to work with your server.

but for activex exe you need to use clireg32
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Article by: evilrix
Looking for a way to avoid searching through large data sets for data that doesn't exist? A Bloom Filter might be what you need. This data structure is a probabilistic filter that allows you to avoid unnecessary searches when you know the data defin…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question