Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_vb thread: Running same package concurrently


Message #1 by Talon Wolles <ta_iwo@y...> on Wed, 20 Nov 2002 16:51:59 -0800 (PST)
Couldn't you make a copy of your project file as a different name and open
it in a second instance of VB?

-----Original Message-----
From: Coral Johnson [mailto:coral.johnson@r...]
Sent: Tuesday, November 26, 2002 10:57 PM
To: professional vb
Subject: [pro_vb] RE: Running same package concurrently


Talon

I understand that you want to run the same vb project in two intances of VB.
I'm not sure whether that should work or not, but there may be another way
to accomplish what you want.

Create an exe of your project, and start the exe.
Open up your project in VB, and run it in the environment.
Now you will be running 2 copies of your program, although one is compiled
and one not.  This should allow you to test your multiuser functionality.

I usually create the exe, then start 2 copies of the exe to do the same
thing.  But if you need to debug, then the previous way might work better.

If this doesn't work, is it possible that you are testing for
App.PrevInstance to prevent 2 copies of your program running on the same
computer.

Coral

>
> Richie, I am not running the exe but the source code.
>
>
> -Talon
>
> --- Richard Ainsley <rainsley@p...> wrote:
> > Did you try making the exe read only?
> >
> > ----- Original Message -----
> > From: "Talon Wolles" <ta_iwo@y...>
> > To: "professional vb" <pro_vb@p...>
> > Sent: Saturday, November 23, 2002 4:29 PM
> > Subject: [pro_vb] Re: Running same package
> > concurrently
> >
> >
> > Thanks Richie. May be you still don't understand my
> > problem. I am just running the source code within
> > VB6.
> > While the source is running, I want to run the
> > source
> > again while the first one is still running in the
> > background, thus creating the illusion of multiuser
> > (two users running the app concurrently). So when I
> > run the first, I minimize it, then how do I start
> > running another one again without quiting the first.
> > That's my problem. I did it before some how my brain
> > can't recollect.
> >
> > Have a nice weekend
> >
> > -Talon
> >
> > --- Richard Ainsley <rainsley@p...> wrote:
> > > Sometimes you need to make your exe's read only.
> > > This usually happened to
> > > me with non-microsoft network systems but it also
> > > did it on older MS peer to
> > > peer networks too.  It is also possible that your
> > > code is locking some
> > > common resource it needs -- maybe the debugging
> > file
> > > stuff or something
> > > else.  Try making the exe read only first then
> > with
> > > the exe read only, try
> > > making others read only and see if it helps.
> > >
> > >
> > > ----- Original Message -----
> > > From: "Talon Wolles" <ta_iwo@y...>
> > > To: "professional vb" <pro_vb@p...>
> > > Sent: Friday, November 22, 2002 5:02 PM
> > > Subject: [pro_vb] Re: Running same package
> > > concurrently
> > >
> > >
> > > Thanks Richard,
> > >
> > > I don't seem to be getting my problem across. The
> > > record lock etc I quite understand. My problem is
> > > trying to run same package on a computer
> > > concurrently.
> > > I go to VB, load the app (project), then click
> > run.
> > > While this is running, I want to load the app
> > > (project) again and then click run, thus making
> > the
> > > app to be running twice simultaneously. This way I
> > > can
> > > now test my multiuser features like the file
> > locking
> > > you talking about. You know you can't test
> > > multi-user
> > > features if the program is not being run
> > > concurrently.
> > >
> > > I don't know if you get my problem. I was able to
> > do
> > > this running concurrently before, but somehow my
> > VB6
> > > was not allowing it. I don't know what I did
> > wrong.
> > >
> > > -Tallon
> > >
> > >
> > >
> > > --- Richard Ainsley <rainsley@p...> wrote:
> > > > Access has some unique features you need to keep
> > a
> > > > look out for.  If you
> > > > have a n Access session open, it is easy to set
> > up
> > > > an exclusive lock on a
> > > > table -- the open exclusive mode is the default
> > > > typically.  In VB6 with ADO,
> > > > it is a little more reliable, but it depends a
> > lot
> > > > on the details.  It
> > > > depends upon exactly how you opened your
> > > recordset.
> > > > For example, you might
> > > > be locking a record as you read it.  Try using
> > the
> > > > optimistic locking
> > > > options, unless it is your intent to lock up a
> > > > record.  Also, don't lock a
> > > > record until you are ready to update it, if
> > > posible.
> > > >  After updating, unlock
> > > > it again.
> > > >
> > > > Optimistic Locking of records can be tricky to
> > > code.
> > > >  You need to maintain a
> > > > guid or time stamp on each record which is
> > chaged
> > > > with each update, then you
> > > > re-read the record, place a record lock. If the
> > > guid
> > > > or time stamp is
> > > > unchanged, them update (nobody else changed it),
> > > > then remove the lock.  In
> > > > an access db you must set a transaction on these
> > > > steps to accomplish this
> > > > which you on the connection object.  If somebody
> > > > else changed the record
> > > > (and you can not reliably update it), then you
> > > need
> > > > to rollback the
> > > > transaction instead of committing it.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: "Talon Wolles" <ta_iwo@y...>
> > > > To: "professional vb" <pro_vb@p...>
> > > > Sent: Thursday, November 21, 2002 4:27 PM
> > > > Subject: [pro_vb] Re: Running same package
> > > > concurrently
> > > >
> > > >
> > > > What I maean is this. I am running a project VB6
> > > in
> > > > Windows98. I am using Access2000 as my database
> > > but
> > > > that is not the problem. I am not running the
> > exe
> > > > file
> > > > but the source code. Now what I want to do is
> > > this:
> > > > As
> > > > I run the source code I can minimize it, then
> > try
> > > to
> > > > run it again thus having 2 runs. So it may look
> > as
> > > > if
> > > > 2 people are running same package (creating a
> > > > multi-user effect). This I was able to do before
> > > but
> > > > suddenly I just couldn't do again. That's what
> > > > baffles
> > > > me.
> > > >
> > > >
> > > > -Talon
> > > >
> > > >
> > > > --- Richard Ainsley <rainsley@p...>
> > wrote:
> > > > > Can't help unless you can be a lot more
> > > specific.
> > > > > Is this just an exe or is
> > > > > there a database involved?, Files?, Printers?,
> > > > > email? Which operating sysem
> > > > > do you work on?
> > > > >
> > > > > One quick thought, if you are taking about an
> > > > Access
> > > > > type database
> > > > > concurrency, check to be certain you are not
> > > > opening
> > > > > it exclusively.
> > > > >
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Talon Wolles" <ta_iwo@y...>
> > > > > To: "professional vb" <pro_vb@p...>
> > > > > Sent: Wednesday, November 20, 2002 4:51 PM
> > > > > Subject: [pro_vb] Running same package
> > > > concurrently
> > > > >
> > > > >
> > > > > > Hi All,
> > > > > >
> > > > > > This may sound stupid but I know I have done
> > > it
> > > > > before
> > > > > > recently but somehow I just couldn't do
> > again.
> > > I
> >
>



  Return to Index