Solved

Multi thread

Posted on 2000-03-20
5
160 Views
Last Modified: 2010-05-02
I want to pass a query from client to server.how to catch a query from client
to server.from server i want to create
thread for each query.and execute each
query with some prirorties.the query will come from differnet clients.
0
Comment
Question by:lakshmirprakashr
5 Comments
 

Author Comment

by:lakshmirprakashr
ID: 2635652
please give some idea about this
0
 
LVL 6

Accepted Solution

by:
VBGuru earned 50 total points
ID: 2635767
1.How to catch a query?
To communicate between the client and the server we have different methods namely, remote automation, MTS , DCOM, sockets, mail slots etc..
You have to decide upon them foirst. It will be very easy and good if you can go for MTS based approch,

2. execute each
query with some prirorties.the query will come from differnet clients.?

Once you have got the query from the client, it is in the server's hand to decide how it will allocate the priority. For assigning the priority there are many algorithms availbale like first come first server, long job first, shorter job first, round robin, last come first, etc...
decide on which will be of help to you in your application.

If you are planning to run the quries simultaniously then you meight need to use multithreading. For example on multithreading in VB check out the following site
0
 
LVL 6

Expert Comment

by:VBGuru
ID: 2635781
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 2635791
What database system are you working on, because if u use SQL Server, Oracle or similar large DBMS products, queries are already executed using multiple threads (fibers in SQL Server)
What do you want to "Optimize"?
0
 
LVL 10

Expert Comment

by:caraf_g
ID: 2686659
Threading without rocket science.

http://homepage.eircom.net/~carafa/TEMP/AWXB.zip 

Explanation / order of compilation
AWXB02MSG.exe - (ActiveX.exe, one thread for all objects) Messaging application that will take care of sending messages between spawned threads and the main application.
AWXB01Thread.dll - The code that will be run in each separate thread
AWXB04Starter.exe - (ActiveX.exe, one thread per object) Application that will take care of creating each new thread.
AWXB03Test.exe - Standard exe. Main application / test bed.

Hope this helps.

0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

856 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