Networks

Question

Locked

vbasic 6 Multi-Clients, Server Application

By megafabinfo ·
Please assist me in designing a clients/server app. in vbasic 6, although, i know how to design it by using TCP winsock, but my question is...let say 3 clients will be using a server-side program on seperate machine to connect to database, insert/select from database. request an id from database through winsock, use it to generate sponsorid for new member, after performing some calculation, send the data to winsock for further processing, and insertion into database. this database grows in number, how will i make the effect to occur at clients side datagrid concurrently. See is a big problem, but if u can just tell me how to make the architectural work of this project, give me samples that send multiple request, and get back multiple responsem or data throught recordset.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Recordset is the key clue

by Xwindowsjunkie In reply to vbasic 6 Multi-Clients, S ...

You might have the client setup to receive a set of variable values from the server that become the begin and end of the recordset. Use a timer object to trigger the client to form a new recordset query and transmit it to the server where I presume the database is hosted. This transmitted query will use the recordset begin and end values received previously from the server. If the server has a new end point larger in value then the one it receives from the client, it modifies the recordset query and sends the data set back with the new begin and end points.

If the client is going to be modifying the database, that will require a different sort or type of SQL query dependent somewhat on the type of database. I can't help you there simply because I'm not a SQL guru.

In the database itself, (Assuming its a MS SQL or Access database) I suggest that you let the database host application always use ascending ID numbers as the primary key. Use a second number as a sort number for the record.

When you mentioned flex-grid did you mean MSHFlexGrid? If not you might look at it. Its a VB6 Professional component.

To connect to the database, the client application will most likely need to use the Microsoft ADO Data Control. Use the ADOdc to point to and connect to the database and the FlexGrid component will be your data display component. Change the SQL text in the ADOdc to send the query to the host.

All versions of VB6 have the Timer component. I seem to remember that you could only have 10 instances of the timer object in any given application. Adding multiple timers though makes things a little rough to keep tract of. It makes a lot more sense to use one timer and have it run at such rate that all timer related functions can run off of it at different intervals held internal to the subroutine.

Any more than that I can't give you since it seems as if the project might be of the scope or size that I would charge my customer for it.

Hope this helps. I still suggest that you do the code at least for the client in VB2005dotNet. You can download "Express" editions of VB2005 and try it out for free.

Related Discussions

Related Forums