Solved

Multi thread

Posted on 2000-03-20
5
158 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 142

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA error replacing data 6 37
Exit a vb6 apps when a calling it apps closes 15 43
Can we place a tooltip on the actual vb6 form 5 35
Child Form in front 4 39
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

867 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now