Board index » delphi » Paradox tables on CDROM

Paradox tables on CDROM

Hi,

I am trying to distribute some Paradox tables on a CDROM. When I try
to access these tables, the BDE attempts  to create PDOXUSER.LCK in
the table' directory on  the CDROM, and fails to open the table
because the CDROM is read-only...

Is there any solution for accessing Paradox tables on a CDROM ?

Thanks,

Yaniv Golan
ygo...@netvision.net.il

 

Re:Paradox tables on CDROM


Quote
ygo...@netvision.net.il (Golan Yaniv) wrote:
>Hi,

>I am trying to distribute some Paradox tables on a CDROM. When I try
>to access these tables, the BDE attempts  to create PDOXUSER.LCK in
>the table' directory on  the CDROM, and fails to open the table
>because the CDROM is read-only.

You can access cdrom files if you set their readonly property to true
and read them thru the BDE from a delphi application running on
the hard drive (or anywhere other than the cdrom).  The .lck files
will be created in the application's current directory.  

I have heard that it is possible to place .lck files on the cdrom in
order to access them but I don't understand the need for this
approach, unless you are trying to run the application from the
cdrom also.

I KNOW this works.  We distribute commercial applications
using this method.

Otto Porter

Re:Paradox tables on CDROM


Quote
redman wrote:
> >I am trying to distribute some Paradox tables on a CDROM. When I try
> >to access these tables, the BDE attempts  to create PDOXUSER.LCK in
> >the table' directory on  the CDROM, and fails to open the table
> >because the CDROM is read-only.
> You can access cdrom files if you set their readonly property to true
> and read them thru the BDE from a delphi application running on
> the hard drive (or anywhere other than the cdrom).  The .lck files
> will be created in the application's current directory.
> I have heard that it is possible to place .lck files on the cdrom in
> order to access them but I don't understand the need for this
> approach, unless you are trying to run the application from the
> cdrom also.
> I KNOW this works.  We distribute commercial applications
> using this method.

Well, I'm sorry I KNOW it doesn't work, at least not when the CD-ROM is
local (i.e not on a network server). If the user already has BDE
installed and is accessing existing tables not on the CD, BDE will
attempt to create the lock files on the CD-ROM and fail to open the
tables.
The solution is, as you mentioned, to put some special lockfiles on the
CD. The lock files must contain a read only directory lock and can be
created with Paradox.

I have attached a zip file containing the two files you must put on the
CD.

[ pdxcdrom.zip < 1K ]
PK   F --------------7B2647FD5801--

Re:Paradox tables on CDROM


Quote
Anders Melander wrote:
> I have attached a zip file containing the two files you must put on the
> CD.

Oups! That didn't work out the way I wanted (I haven't tried to attach
from Netscape's news reader before).

Hope I get it right this time...

  pdxcdrom.zip
< 1K Download

Re:Paradox tables on CDROM


Quote
Anders Melander <a...@biocat.ruc.dk> wrote:

>Well, I'm sorry I KNOW it doesn't work, at least not when the CD-ROM is
>local (i.e not on a network server). If the user already has BDE
>installed and is accessing existing tables not on the CD, BDE will
>attempt to create the lock files on the CD-ROM and fail to open the
>tables.

Well, I'm NOT sorry.  You are incorrect and spreading false
information by insisting that what I AM DOING on a system
which is sitting right next to me CAN'T be done.

This application installs two large paradox .db files on the
hard drive along with the program (.exe, etc.), installs IDAPI
and creates two aliases, one to the program directory and
one to the data directory on the cdrom.  The application performs
queries on the .db files on both the hard drive and the cdrom.

It is doing so as we speak.  The system is NOT connected to a
network.  All the .db files are configured as read only, which may
make a difference.  However, you're unqualified statement that
this isn't possible is BULLSHIT.

Otto Porter

Re:Paradox tables on CDROM


Quote
opor...@bix.com (redman) wrote:
> You can access cdrom files if you set their readonly property to true
> and read them thru the BDE from a delphi application running on
> the hard drive (or anywhere other than the cdrom).  The .lck files
> will be created in the application's current directory.  

> I have heard that it is possible to place .lck files on the cdrom in
> order to access them but I don't understand the need for this
> approach, unless you are trying to run the application from the
> cdrom also.

> I KNOW this works.  We distribute commercial applications
> using this method.

> Otto Porter

Otto,

I've tried your solution, and so far it doens't work for me. If I
understood you correctly, what you suggested is setting the TTable's
ReadOnly property to "True". (The .DB is already read-only since it is
on a CD).

Are there more steps involved ? Any special settings for the NetDir or
PrivateDir perhaps ?

I've tried it on both local and networked CDROM drives.

Thanks,

Yaniv Golan

Yaniv Golan
email : ygo...@hyperact.com, ygo...@netvision.net.il

Re:Paradox tables on CDROM


Quote
opor...@bix.com (redman) wrote:
>>Well, I'm sorry I KNOW it doesn't work, at least not when the CD-ROM is
>>local (i.e not on a network server). If the user already has BDE
>>installed and is accessing existing tables not on the CD, BDE will
>>attempt to create the lock files on the CD-ROM and fail to open the
>>tables.
>Well, I'm NOT sorry.  You are incorrect and spreading false
>information by insisting that what I AM DOING on a system
>which is sitting right next to me CAN'T be done.

It might work for you... but my experience, based on several
commercial CD-ROM based databases, is that the only safe method is to
put the lock files on the CD-ROM and to quote Borland's TI3104:

----------------
The Paradox locking scheme requires the existence of a PDOXUSRS.LCK
file to handle its locking logic. This file is generally created at
run-time and resides in the directory which also contains the tables.
However, with a CD-ROM there is not a way to create this file at
run-time on the CD-ROM. The solution is simple, we create this file
and put it on the CD-ROM when the CD is pressed. The following steps
will give you a very simple utility program for creating the
PDOXUSRS.LCK file which you will then copy to the CD-ROM image.
----------------

also, I have talked to Borland previously about this issue and they
say you _have_ to put the lock files on the CDROM.

Quote
>All the .db files are configured as read only, which may
>make a difference.

Any file on a CDROM will allways have the read-only attribute set -
It's not something you can decide.

Quote
>However, you're unqualified statement that this isn't possible is BULLSHIT.

I think you're a bit out of line now OTTO. If you need to flame me,
you are welcome to do so by eMail instead.

+-------------------------+---------------------------+
|  Anders Bo Melander     | Phone: (+45) 31 87 91 26  |
|  Finsensvej 79, 2. tv.  | mailto:a...@biocat.ruc.dk |
|  DK-2000 Frederiksberg  |                           |
|  Denmark                | (This space for rent :-)  |
+-------------------------+---------------------------+
| http://ftp.frontier.dk/public/Delphi2/tbedit01.html |
+-----------------------------------------------------+

Re:Paradox tables on CDROM


Borland has recently issued a TI doc on how to do this.

--
Paul Motyer
pa...@linuxserver.pccity.com.au
SoftStuff, Croydon, Vic,  Australia, 3136.

redman <opor...@bix.com> wrote in article
<325d619e.2921...@news.xmission.com>...

Quote
> Anders Melander <a...@biocat.ruc.dk> wrote:

> >Well, I'm sorry I KNOW it doesn't work, at least not when the CD-ROM is
> >local (i.e not on a network server). If the user already has BDE
> >installed and is accessing existing tables not on the CD, BDE will
> >attempt to create the lock files on the CD-ROM and fail to open the
> >tables.

> Well, I'm NOT sorry.  You are incorrect and spreading false
> information by insisting that what I AM DOING on a system
> which is sitting right next to me CAN'T be done.

> This application installs two large paradox .db files on the
> hard drive along with the program (.exe, etc.), installs IDAPI
> and creates two aliases, one to the program directory and
> one to the data directory on the cdrom.  The application performs
> queries on the .db files on both the hard drive and the cdrom.

> It is doing so as we speak.  The system is NOT connected to a
> network.  All the .db files are configured as read only, which may
> make a difference.  However, you're unqualified statement that
> this isn't possible is BULLSHIT.

> Otto Porter

Re:Paradox tables on CDROM


Quote
a...@biocat.ruc.dk (Anders Melander) wrote:

>It might work for you... but my experience, based on several
>commercial CD-ROM based databases, is that the only safe method is to
>put the lock files on the CD-ROM and to quote Borland's TI3104:

What is this {*word*99} about  "based on several commercial CD-ROM
based databases"?  Have you done this yourself with .db files
under direct control of a delphi application?  I think not.

Quote

>Any file on a CDROM will allways have the read-only attribute set -
>It's not something you can decide.

Maybe this is an indication of the depth of your experience
(or lack thereof) with delphi.  Table and Query objects
DEFINITELY DO have a readonly PROPERTY, but it
sounds as if you are unaware of that.  I wasn't referring
to the operating system FILE attribute.

Come back when you know what you are talking about.

Otto Porter

Re:Paradox tables on CDROM


Dear OTTO.
As you have chosen to ignore my request for etiquette, I will end this
discussion, for my part, with this reply.

***FLAME ON***

Quote
>>It might work for you... but my experience, based on several
>>commercial CD-ROM based databases, is that the only safe method is to
>>put the lock files on the CD-ROM and to quote Borland's TI3104:
>What is this {*word*99} about  "based on several commercial CD-ROM
>based databases"?  Have you done this yourself with .db files
>under direct control of a delphi application?  I think not.

Oh my! We are getting a bit e{*word*277}d now, aren't we OTTO? Allow me to
retort:

Think what you will OTTO, I have been making CD-ROM based databases
since the first release of Delphi 1 and my advise was, as I stated,
based on my own experiences and on discussion of this subject with
Borland.
The applications I speak of, are all implemented in Delphi 1 and 2 and
all but one uses Paradox tables on CD. The tables are accessed with
the standard Delphi TTable components and a specialized CD-ROM query
engine of own design.

Your method WILL work on a local CD-ROM on Windows95 under some
circumstances. My/Borland's method will work on any systems. The
following are my experiences:
On Windows 95: If the CD-ROM is on another machine in the network, you
need the lock file. If the CD-ROM is local, you don't.
On Windows 3.x: If the CD-ROM is on another machine in the network OR
if it is local and you have shared your CD--ROM drive, you need the
lock file. If the CD-ROM is local and NOT shared, you don't.

I suppose the difference in behaviour between Win3.x and Win95 has to
do with a change in the CD-ROM driver and/or network client software.

If your software is targeted for shops with Windows95 only and a
CD-ROM drive in every machine, then go ahead and ignore the lock
files, but for mass produced CD-ROM databases, you simply cannot
ignore the huge installed base of older Windows 3.x systems with a
single CD-ROM drive. (By mass produced I mean 200000+ units for the
Scandinavian market).
In your eMail to me, you expressed your opinion about people (such as
myself) who claim that you have to put lock files on the CD. Shouldn't
the fact that so many people, including Borland, are making this
claim, give you a hint that there might be something you haven't
thought about? I suppose not. What does ignorants as us know?

Quote
>>Any file on a CDROM will allways have the read-only attribute set -
>>It's not something you can decide.
>Maybe this is an indication of the depth of your experience
>(or lack thereof) with delphi. [...]

What is your point here OTTO? If you can't tolerate when people
misunderstand what you are saying, perhaps you should express yourself
better.

Quote
>[...]Come back when you know what you are talking about.

Oh, I'm so sorry for having wandered mindlessly into THE TEMPLE OF THE
ONE AND ONLY CORRECT OPINION. What blasphemy! Will I ever dare to
speak again once OTTO has spoken?
As far as I know, my original answer actually helped Yaniv solve his
problem. Isn't that what we are supposed to do here; Help each other?

If your ego can't handle when people have another opinion than yours,
you should form your own news group. May I suggest: alt.otto.stayaway

***FLAME OFF***

That's it from me. Shout all you want.
And to everybody else: Sorry for the noise.

+-------------------------+---------------------------+
|  Anders Bo Melander     | Phone: (+45) 31 87 91 26  |
|  Finsensvej 79, 2. tv.  | mailto:a...@biocat.ruc.dk |
|  DK-2000 Frederiksberg  |                           |
|  Denmark                | (This space for rent :-)  |
+-------------------------+---------------------------+
| http://ftp.frontier.dk/public/Delphi2/tbedit01.html |
+-----------------------------------------------------+

Re:Paradox tables on CDROM


Quote
a...@biocat.ruc.dk (Anders Melander) wrote:
>As you have chosen to ignore my request for etiquette, I will end this
>discussion, for my part, with this reply.

Oh my!  You are still feeling a bit superior now, aren't you?

[pissing on flame]
             !
             !
          \\ |//

Quote
>***FLAME ON***

>Your method WILL work on a local CD-ROM on Windows95 under some
>circumstances. My/Borland's method will work on any systems. The
>following are my experiences:

Thank you, but I already know my method  works.  That's what I originally
said.  

You  stated WITHOUT QUALIFICATION, that it
would not.

Now  I see that your admitting to qualifications after all.  

Quote
>On Windows 95: If the CD-ROM is on another machine in the network, you
>need the lock file. If the CD-ROM is local, you don't.
>On Windows 3.x: If the CD-ROM is on another machine in the network OR
>if it is local and you have shared your CD--ROM drive, you need the
>lock file. If the CD-ROM is local and NOT shared, you don't.

[more qualifications snipped, blah, blah, blah]

Quote
>In your eMail to me, you expressed your opinion about people (such as
>myself) who claim that you have to put lock files on the CD. Shouldn't
>the fact that so many people, including Borland, are making this
>claim, give you a hint that there might be something you haven't
>thought about? I suppose not. What does ignorants as us know?

Get your facts straight please.  I said absolutely nothing, pro or con
about the other methods for accessing cdrom files.  My response
was strictly to your unequivocal disqualification of the method I
suggested.

Quote
>What is your point here OTTO? If you can't tolerate when people
>misunderstand what you are saying, perhaps you should express yourself
>better.

Uh oh, more m{*word*203}superiority leaking out here again.

[more morally superior blather and whining snipped]

Quote
>If your  ego can't handle when people have another opinion than yours,
>you should form your own news group. May I suggest: alt.otto.stayaway

May I suggest, alt.anders.bite.me.

Otto Porter

Re:Paradox tables on CDROM


Hi Anders,

As someone embarking on CD-Rom database production, your views, advice and
opinions are much appreciated. Noise gratefully recieved :-))

Ray Cramer
R...@Pol.ac.uk

Other Threads