Sharing violation - Clipper 5.02 app under Win95 
Author Message
 Sharing violation - Clipper 5.02 app under Win95

I sure would appreciate it if anyone could help me out on this...

I got a phone call from a former client a while back.  He asked if he
could run the Clipper app I developed for him under Win95, as he
wanted to buy a new PC.  I said yes, that shouldn't be any problem.

He called me back a while later, having bought the new PC, and
reported that after he made the switch, a few of the routines no
longer worked.  I ran the app on my PC, and sure enough, a couple of
the routines returned DOS sharing violations (DOS error 5).  In the
code, I found this to occur when the app tries to access the same DBF
from two different workareas (SELECT numbers).

The wonder of it all is that this works fine if I boot the machine
with 'Command Prompt Only'.  Since this is the same DOS version as
Win95 runs in its DOS boxes, I don't get it...  Obviously, my former
client can't run it this way, since he uses Win95 apps as well.

Does anybody have any ide on how to fix this, so that my client can
run the Clipper app in a Win95 DOS box and not get the sharing
violation??

Any help very much appreciated!

Ketil



Sat, 06 Nov 1999 03:00:00 GMT  
 Sharing violation - Clipper 5.02 app under Win95

Hi,

As far as I know, when you open a DOS Window under Win'95, it's opened with
networking properties, that is, it behaves as though a network is working
and locks files and records to control simultaneous access. In consequence,
if you for example launch the same program twice (two DOS Windows), you'll
notice that when you try to open the same database, you'll get the same
problem. This type of situation, in my particular case, has been quite good
because it allows me to experiment my networking functions on my personal
computer without having to try it out on a real network (with various
workstations, and so on).

The solution to the problem can be one of three situations:
1 - You've already discovered it, i.e., booting the machine with the DOS
command prompt only,
2 - Try avoiding opening the same database in different work areas,
3 - Opening the files in shared mode, because by default, Clipper opens the
files in exclusive mode. In this case, you'll have to reprogram most of
your functions that manipulate the databases because if files are opened in
shared mode, you'll need to start using recording locking (RLOCK( )) apart
from the fact that some functions can't be used with the shared mode
(REINDEX, PACK, for example). In conclusion, you'll have to transform your
program into a real "networking program".

Not very good news...

Estevao Raminhos

http://www.geocities.com/SiliconValley/Pines/2002

----------

Quote:

> Newsgroups: comp.lang.clipper
> Assunto: Sharing violation - Clipper 5.02 app under Win95
> Data: ter?a-feira, 20 de maio de 1997 13:23

> I sure would appreciate it if anyone could help me out on this...

> I got a phone call from a former client a while back.  He asked if he
> could run the Clipper app I developed for him under Win95, as he
> wanted to buy a new PC.  I said yes, that shouldn't be any problem.

> He called me back a while later, having bought the new PC, and
> reported that after he made the switch, a few of the routines no
> longer worked.  I ran the app on my PC, and sure enough, a couple of
> the routines returned DOS sharing violations (DOS error 5).  In the
> code, I found this to occur when the app tries to access the same DBF
> from two different workareas (SELECT numbers).

> The wonder of it all is that this works fine if I boot the machine
> with 'Command Prompt Only'.  Since this is the same DOS version as
> Win95 runs in its DOS boxes, I don't get it...  Obviously, my former
> client can't run it this way, since he uses Win95 apps as well.

> Does anybody have any ide on how to fix this, so that my client can
> run the Clipper app in a Win95 DOS box and not get the sharing
> violation??

> Any help very much appreciated!

> Ketil



Sat, 06 Nov 1999 03:00:00 GMT  
 Sharing violation - Clipper 5.02 app under Win95

Quote:
>In conclusion, you'll have to transform your
>program into a real "networking program".

>Not very good news...

Have a look at the LOCKS.PRG in your \clipper\source\sample directory
for a good place to start.  It's not a bad as it sounds.

--
Don Andersen
Phone +61 07 3881 2432
QUEENSLAND AUSTRALIA

"I never forget anything I remember"



Sun, 07 Nov 1999 03:00:00 GMT  
 Sharing violation - Clipper 5.02 app under Win95

Hi!

I really appreciate your answer to my question, although it did
confirm my worst fears...  I was hoping there'd be a way to "shield"
a DOS box from the Win95 networking features, allowing my ex-client
to run the program as is.

I agree that the multiple lauch to simulate networking is a great way
of testing apps, but in this particullar case it's a nuisance :))

Quote:
> The solution to the problem can be one of three situations:
> 1 - You've already discovered it, i.e., booting the machine with
> the DOS command prompt only,

Not an option, as my client also runs Win95 apps.  As much as I would
like this problem off my shoulders, I won't sink to the level of
suggesting he reboots between apps... :))

Quote:
> 2 - Try avoiding opening the same database in different work areas,
> 3 - Opening the files in shared mode

Rewriting it for networking is not an option - I abandoned Clipper
when Access was first released (the company I work for wanted Windows
apps, VO had been promised for the better part of 2 years, and still
hadn't shown up).  Later I switched to VB (with the release of
version 4).

What all this means is that it would be quicker for me to just
rewrite the entire app under VB than to start fixing up old Clipper
code.  If something has to be done, a VB rewrite would also be a
better service to my client than a Clipper fix-up.

Quote:
> Not very good news...

No, but at least now I know the facts, and can relate to that rather
than to why it's not working :))

Thanks again for your help!

Ketil

--


Home Page: http://home.sn.no/~krumm/



Sun, 07 Nov 1999 03:00:00 GMT  
 Sharing violation - Clipper 5.02 app under Win95

Quote:

> I sure would appreciate it if anyone could help me out on this...

> I got a phone call from a former client a while back.  He asked if he
> could run the Clipper app I developed for him under Win95, as he
> wanted to buy a new PC.  I said yes, that shouldn't be any problem.

> He called me back a while later, having bought the new PC, and
> reported that after he made the switch, a few of the routines no
> longer worked.  I ran the app on my PC, and sure enough, a couple of
> the routines returned DOS sharing violations (DOS error 5).  In the
> code, I found this to occur when the app tries to access the same DBF
> from two different workareas (SELECT numbers).

> The wonder of it all is that this works fine if I boot the machine
> with 'Command Prompt Only'.  Since this is the same DOS version as
> Win95 runs in its DOS boxes, I don't get it...  Obviously, my former
> client can't run it this way, since he uses Win95 apps as well.

> Does anybody have any ide on how to fix this, so that my client can
> run the Clipper app in a Win95 DOS box and not get the sharing
> violation??

> Any help very much appreciated!

> Ketil

 Try this line at the begining of your code (not sure if it will work
but try anyways):

SET EXCLUSIVE OFF

Good luck



Sun, 07 Nov 1999 03:00:00 GMT  
 Sharing violation - Clipper 5.02 app under Win95

Quote:


> > I sure would appreciate it if anyone could help me out on this...

> > I got a phone call from a former client a while back.  He asked if he
> > could run the Clipper app I developed for him under Win95, as he
> > wanted to buy a new PC.  I said yes, that shouldn't be any problem.

> > He called me back a while later, having bought the new PC, and
> > reported that after he made the switch, a few of the routines no
> > longer worked.  I ran the app on my PC, and sure enough, a couple of
> > the routines returned DOS sharing violations (DOS error 5).  In the
> > code, I found this to occur when the app tries to access the same DBF
> > from two different workareas (SELECT numbers).

> > The wonder of it all is that this works fine if I boot the machine
> > with 'Command Prompt Only'.  Since this is the same DOS version as
> > Win95 runs in its DOS boxes, I don't get it...  Obviously, my former
> > client can't run it this way, since he uses Win95 apps as well.

> > Does anybody have any ide on how to fix this, so that my client can
> > run the Clipper app in a Win95 DOS box and not get the sharing
> > violation??

> > Any help very much appreciated!

> > Ketil

>  Try this line at the begining of your code (not sure if it will work
> but try anyways):

> SET EXCLUSIVE OFF

> Good luck

Windows '95 invokes the share command automatically.  Be sure you
implement networking procedures in your program code.


Wed, 10 Nov 1999 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. WIN ME and CLIPPER 5.02

2. Clipper app sharing CDX with FoxPro app

3. VO 2.0 / Clipper - Sharing Violations

4. Working Win95 - Clipper 3.10a and shared 2 Pc's

5. Help - a clipper apps get minimized when shared modem start to dial

6. Sharing a file between Clipper Apps

7. Probs with 5.2d (Update from 5.02)

8. LavVIEW 5.02 patch

9. GHC 5.02 and Word8

10. About Snap 5.02

11. TASM 5.0 with BC++ 5.02 ?

12. BC++ 5.02 and Tasm32.exe....

 

 
Powered by phpBB® Forum Software