Results 1 to 4 of 4

Thread: Client/server samples?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    8

    Exclamation Client/server samples?

    I run a fantasy basketball league. I'm creating a program in VB6, using an Access database, that allows owners of teams to login and change details of their team. What I want to be able to do is allow them to then upload these changes to a central server - i.e. a PC that I have running 24/7 specifically for this purpose. I would also like them to be able to request an update file -- not necessarily an updated .exe, but an updated database (either an .mdb or a custom format that I will create) for instance, which is then inputted into their program. Along the same lines, it would be useful if they could interact with other members of the league through this system: i.e. uploading a trade offer, and then the server notifying the other member that they have a trade offer and allowing them to download it.

    I attempted to do using FTP but it became unwieldy, and sometimes the changes wouldn't upload. I'm not quite sure what I need to do to make the client/server connection. Ideally I would like something where on my end, it tells me who is logged in and who has uploaded changes. On their end, they simply need the ability to upload changes, and to download any updates.

    Basically:

    Client: Sends updated lineups (etc.) to Server / Sends messages to Server for retrieval by other clients

    Server: Sends updated database to Client / Sends notification of awaited messages to Client

    Hopefully that's clear. All I need is samples of code/functions that I can use to achieve this, or some simple app that I can modify for my own purposes. Any pointers or code snippets you could offer would be appreciated.

    Thanks in advance!

  2. #2
    New Member
    Join Date
    Apr 2005
    Posts
    14

    Re: Client/server samples?

    A couple of things you can do here.

    1) I'm asssuming that you have IIS (or other web service running). So the easiest thing to do would be to modify the app to send and retrieve data directly to and from the DB, then give everyone a copy of your app. You can use the Package and deployment Wizard to create a CAB file and HTML page that will download and install onto the client.

    2) Use ASP app to do the same thing. You could change your app to an ActiveX control and use ASP web pages to instantiate the control. The control would contain all the logic to insert and retrieve the data. As above, us the deploymnet wizard to create the CAB and HTML page.

    Hope it helps.

    Goomba

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2005
    Posts
    8

    Re: Client/server samples?

    Thanks for your advice. I don't really want to convert the app to an ActiveX control nor do I really want to alter it in a such a way via the web. I was hoping there would be another method in terms of the client program being able to login to the server program, or the server program sending an update file when the client program requests it. Surely it is just going to be a TCP/IP routine somewhere? The problem is I don't exactly know where to start with this.

    I guess what I really need is just some samples of code to allow a program to interface with another via TCP/IP (and being able to see who is connected from the server app). From that I suppose I can work out the logistics of the upload/download stuff.

  4. #4
    New Member
    Join Date
    Apr 2005
    Posts
    14

    Re: Client/server samples?

    A quick thought says to look at Winsock. Start with these links:

    http://www.geocities.com/alpha_produ...vb_winsock.htm
    http://www.snible.org/winsock/

    Essentially, you'll want ot create a Winsock Server ActiveX DLL to listen on a particular port. Then you'll need to add a piece to your app to connect to the winsock application and port on the server. Then they would exchange appropriate information.

    Goomba

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