Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 16 of 16 total
Thread Switched to BDS 2006 today - Can't open TDBISAMTable inside IDE
Fri, Mar 9 2007 10:41 AMPermanent Link

Dave Harrison
Tim Young [Elevate Software] wrote:

> Dave,
>
> << Ok, I figured out what the problem is. Apparently I can't use "Data" as
> the TDBISAMDatabase Directory in the IDE. It wants an explicit path out to
> the data directory as in "c:\project1\data". I thought it would be smart
> enough to know where the project was and just add "Data" to the current
> directory. Sheesh. >>
>
> "It" meaning DBISAM ?
Correct

 At the engine level, DBISAM doesn't even know that it
> is running in an application, let alone that there's a project.  When you
> say "data", all it knows is that you want to reference the data directory
> from whatever the current working directory is.

I thought you would use the project directory as the "current directory"
and just tack on "data" (the database directory) on the end of it.

> If the IDE or something
> else changes the current working directory, then you're going to get the
> wrong directory.  This is why I usually recommend to *not* use relative path
> names in database directories with DBISAM.
>
Sure, but that means
1) You must explicitly define the database directory path in the IDE if
you want to open a table and get the field definitions
2) When the data module is created, write code to change the database
directory so it is relative to the current directory.

All of this is unecessary if you permitted relative directories.
I always took the "current directory" to mean the project directory, and
that's not going to change regardless of what the IDE is doing.

Dave
Fri, Mar 9 2007 11:14 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


Be fair. If M$ had written MS-DOS that would have been equally bad Smiley

Roy Lambert
Fri, Mar 9 2007 11:14 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


>All of this is unecessary if you permitted relative directories.
>I always took the "current directory" to mean the project directory, and
>that's not going to change regardless of what the IDE is doing.

I have yet to figure out what D2006 is doing with directories. I suspect the answer is "trying to be to clever"

Roy Lambert
Fri, Mar 9 2007 5:58 PMPermanent Link

Dave Harrison
Roy Lambert wrote:
> Dave
>
>
> Be fair. If M$ had written MS-DOS that would have been equally bad Smiley
>
> Roy Lambert
>

The only original piece of software that Microsoft wrote themselves was
"Clippy", and we all know how well that went. Maybe if we start a letter
writing campaign, they'll bring it back for Vista? Smile

Dave
Fri, Mar 9 2007 6:49 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Dave,

<< I thought you would use the project directory as the "current directory"
and just tack on "data" (the database directory) on the end of it. >>

That's the problem - the IDE and other Windows file dialogs can change the
current working directory during operation of the IDE.  The current working
directory is just what it says it is, and DBISAM can only use the current
working directory.  It has no knowledge whatsoever of any Delphi project
directory in the IDE.

<< Sure, but that means
1) You must explicitly define the database directory path in the IDE if you
want to open a table and get the field definitions
2) When the data module is created, write code to change the database
directory so it is relative to the current directory. >>

Yes, that is the safest way to do things.

<< All of this is unecessary if you permitted relative directories.  I
always took the "current directory" to mean the project directory, and
that's not going to change regardless of what the IDE is doing. >>

We *do* permit relative path names.  What we can't control is whether the
IDE changes the current working directory and fouls up what you expect to be
the current working directory.

--
Tim Young
Elevate Software
www.elevatesoft.com

Sat, Mar 10 2007 3:45 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Dave


Not even in jest please!

Roy Lambert
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image