Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread strange behavious with database filenames
Tue, Jul 4 2006 7:00 AMPermanent Link

Mike Mayer
Hi,

I have upgraded  tables in folder, also used SQL to modify tables structure and RENAMED
several tables. While using GetTableNames procedure I get list of all tables includes
those which was upgraded/backed up.

Is it possible to get only "real" tables?

I use 4.* version.
Mike
Wed, Jul 5 2006 1:28 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mike,

<< I have upgraded  tables in folder, also used SQL to modify tables
structure and RENAMED several tables. While using GetTableNames procedure I
get list of all tables includes those which was upgraded/backed up. >>

Are you sure that you're not pointing to a different database folder than
what you think you are ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jul 10 2006 5:34 AMPermanent Link

Mike Mayer
<<Are you sure that you're not pointing to a different database folder than
what you think you are ?>>

Absolutely.

I have attached gif file with my database folder, "real tables" marked in red, tables created in
database convertion and sql altering proccess is marked in black.

The second image show tables list which I get with GetTableNames.

Take attenshion to Article table, it does not exists in folder as "real" table, there is only upgrade and backup
versions of this table, but it still appears in GetTableNames list.

Regards
Mike



Attachments: GetTableNames.zip
Mon, Jul 10 2006 1:38 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Mike,

<< I have attached gif file with my database folder, "real tables" marked in
red, tables created in database convertion and sql altering proccess is
marked in black.

The second image show tables list which I get with GetTableNames.

Take attenshion to Article table, it does not exists in folder as "real"
table, there is only upgrade and backup versions of this table, but it still
appears in GetTableNames list. >>

You didn't mention that you changed the file extensions that DBISAM uses for
backups and upgrades.  You need to change them to something other than
"dat_upgrade" etc.  The first portion of the extension (3 chars) is the same
as the normal file, hence DBISAM is still matching them as valid files.  Use
something that doesn't match on the first 3 chars such as "upgrade_dat",
etc.

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jul 10 2006 2:10 PMPermanent Link

Bernd Kuhlmann
Mike,

> <<Are you sure that you're not pointing to a different database folder
> than what you think you are ?>>
>
> Absolutely.
>
> I have attached gif file with my database folder, "real tables" marked in
> red, tables created in database convertion and sql altering proccess is
> marked in black.
>
> The second image show tables list which I get with GetTableNames.
>
> Take attenshion to Article table, it does not exists in folder as "real"
> table, there is only upgrade and backup versions of this table, but it
> still appears in GetTableNames list.
DBisam uses FindFirst/FindNext to get the table names which has the
bug/feature to also return the windows short file name.
You would get the same result if you enter dir *.dat (or dir /X *.dat) in a
dos window.


Bernd Kuhlmann
Mon, Jul 10 2006 2:52 PMPermanent Link

Mike Mayer
I see, I didn't thought about that  Smile
Image