Board index » delphi » Turbo Pascal 6 and Windows 95 (Dos Mode)

Turbo Pascal 6 and Windows 95 (Dos Mode)

I am working on an application which is made with Turbo Pascal 6 and Topaz
(for connection with DBase). This application contains 11 PC's with the same
program (Turbo Pascal 6), all these programs are using the same database
(DBase, on a network). With DOS everything is working OK. Now I am changing
DOS for Windows 95 and I have the following problem. Only one computer can
connect to the database. Every other computer, on which I want to run this
program an error message appears (error 150, problem opening index file).
This problem only occurs when I am working with a DOS box, when I restart in
the DOS mode everything is working fine.
Does anybody know how I can solve this problem ?

adriaan.walra...@gironet.nl

 

Re:Turbo Pascal 6 and Windows 95 (Dos Mode)


I have got similar problem with access and without pascal... With windows
95, for accessing my database with more than one computer, I have due not
only to put it in a share area but also to define in the database otself
some rigths for accessing it. Could it be something like that ?

Adriaan Walraven <adriaan.walra...@gironet.nl> wrote in article
<929984078.378232@polka>...

Quote
> I am working on an application which is made with Turbo Pascal 6 and
Topaz
> (for connection with DBase). This application contains 11 PC's with the
same
> program (Turbo Pascal 6), all these programs are using the same database
> (DBase, on a network). With DOS everything is working OK. Now I am
changing
> DOS for Windows 95 and I have the following problem. Only one computer
can
> connect to the database. Every other computer, on which I want to run
this
> program an error message appears (error 150, problem opening index file).
> This problem only occurs when I am working with a DOS box, when I restart
in
> the DOS mode everything is working fine.
> Does anybody know how I can solve this problem ?

> adriaan.walra...@gironet.nl

Re:Turbo Pascal 6 and Windows 95 (Dos Mode)


Adriaan Walraven said:

Quote
> Now I am changing
>DOS for Windows 95 and I have the following problem. Only one computer can
>connect to the database. Every other computer, on which I want to run this
>program an error message appears (error 150, problem opening index file).

Win95 implements the equivalent of share.esxe in previous DOS versions.

You'll need to change the file mode to allow "read/write/deny none"
using
        filemode := $42;  

If the Topaz units do not explicitly set filemode then it will be
sufficient to put the above line in the startup code of your program.

--
Why do clairvoyants need doorbells ?

Re:Turbo Pascal 6 and Windows 95 (Dos Mode)


In article <929984078.378232@polka>,
  "Adriaan Walraven" <adriaan.walra...@gironet.nl> wrote:

Quote
> I am working on an application which is made with Turbo Pascal 6 and
Topaz
> (for connection with DBase). This application contains 11 PC's with
the same
> program (Turbo Pascal 6), all these programs are using the same
database
> (DBase, on a network). With DOS everything is working OK. Now I am
changing
> DOS for Windows 95 and I have the following problem. Only one computer
can
> connect to the database. Every other computer, on which I want to run
this
> program an error message appears (error 150, problem opening index
file).
> This problem only occurs when I am working with a DOS box, when I
restart in
> the DOS mode everything is working fine.
> Does anybody know how I can solve this problem ?

> adriaan.walra...@gironet.nl

There are differences in how a Win95 DOS box handles opening a file
compared to other versions of DOS, specifically related to the file
sharing features. Take a look at http://www.ctyme.com/intr/RB-2743.HTM
for Ralf Brown's 'Open Existing File' function call for tables
documenting the differences. My guess is that you'll have to change the
way that the file sharing bits are set (using the FileMode variable)
when first opening the file.

Fo myself, I noticed, for example, that in Turbo Vision (in a Win95 DOS
box) if you open a TDosStream file with extra file sharing bits set for
DENY_NONE, and then try to open the same file again, a Critical File
error is flagged which isn't handled properly by the normal SysErrorFunc
and the whole system crashes. The fix is to write your own SysErrorFunc
and intercept errorcode values which are > 15.

Regards,

Scott Harris

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.

Other Threads