Re: Running Query in VB-6 using MultiThreading ?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Doug Stoltz (NoSpam_at_MyEmail.com)
Date: 08/09/04


Date: Mon, 9 Aug 2004 17:04:43 -0400

Here's some info on threading...

If you look in a VB6 project's properties window you can see the threading
options. For Appartment Threaded or single threaded you do not get the
"thread per object" or "thread pool" options. However, for the project type
ActiveX EXE you can specify the threading options. I'm sure you can find
explanations on how to use these properly, but it would take some digging.
The best book I've seen is the O'Reily study guide for the VB 6 exams. I can
highly recommend this book.

In practical terms, Val is correct that you don't have the ability to
multi-thread in most types of VB6 projects. However, if you *really* want
to, you can try it. I'd recommend otherwise for your particular problem.

Good luck

"Val Mazur" <group51a@hotmail.com> wrote in message
news:uepB8fXfEHA.3292@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> There is no true support of the multithreading in VB6. Only way to do this
> is to use timer in your application, which will run some code at some
moment
> of time. In this case it would be similar to multithreading. But would be
> pretty difficult to run multiple async queries using ADO. I would suggest
to
> populate grids one-by-one, but to minimize selection of the data to get
good
> performance. If you need to know how to run queries in async mode, then
> check next KB with an example
>
> http://support.microsoft.com/default.aspx?scid=kb;en-us;190988
>
> --
> Val Mazur
> Microsoft MVP
>
>
> "Luqman" <pearlsoft@cyber.net.pk> wrote in message
> news:O1siVuRfEHA.4092@TK2MSFTNGP10.phx.gbl...
> > Is there any example or web site where I can find how to run a ADO
> > Recordset
> > Query in VB-6 and fill the MSHFlex Grid Async using Multi Threading ?
> >
> > Best Regards,
> >
> > Luqman
> >
> >
> >
>
>



Relevant Pages

  • Re: Walkthrough Instruction Error
    ... What I said was a VB6 app can do threading using activex.exe but that is out of process. ... What Olaf implied was that his external library written in some other language isn't out of process, yet what he did say was his threading was not light weight and that his library uses pipes. ... What's Olaf's libraries do *Exactly* is hard to tell because he won't put the source code out there, but we do know there is also marshalling occurring. ...
    (microsoft.public.vb.general.discussion)
  • Re: Multi Threading Application using VB6.0
    ... "multi-threaded" VB6 applications of the sort (ActiveX EXEs) you mention. ... BTW, my experience with ujsing STA threading was extremely negative, so I ... VB6, STA thread is possible. ... multi-process. ...
    (microsoft.public.vb.general.discussion)
  • Re: IIS 5.0 hangs on call to dll
    ... What should the threading model be:Single threaded or apartment threaded? ... am trying to recomplie this DLL in VB6 with retained in memory option checked. ... you can migrate the code to VB6 and re-compile using the ...
    (microsoft.public.inetserver.iis)
  • Re: thread problem
    ... If you want true multi threading then I'd recommend to use VB.NET. ... Have a look at the Coffee project documentation that came with VB6. ... having to wait when opening "FormB", the user will have to wait (a long ... time), somewhere on "FormA". ...
    (microsoft.public.vb.general.discussion)
  • Re: I Cant receive events in the 2nd. call
    ... there are no "good" threading samples for VB6 because ... VB6 does not support threading, so all samples you will find are "bad"!! ...
    (microsoft.public.win32.programmer.tapi)