Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread session.GetTableNames and file extensions
Thu, Oct 11 2007 2:43 PMPermanent Link

Jon Lloyd Duerdoth
In doing some error checking of an application I wanted to
temporarily hide a data table so I did a rename
from Accounts.dat
 to Accounts.datx

The following
session.GetTableNames(gDatabaseName, lStr);
still loaded the table name.


Renaming to Accounts.da hid the table from GeTTablenames.

Is this the way it's supposed to be?

JonD
Thu, Oct 11 2007 9:30 PMPermanent Link

Jon Lloyd Duerdoth
Should have mentioned that I'm using

v4.25 b 6

JonD

Jon Lloyd Duerdoth wrote:
> In doing some error checking of an application I wanted to
> temporarily hide a data table so I did a rename
> from Accounts.dat
>  to Accounts.datx
>
> The following
> session.GetTableNames(gDatabaseName, lStr);
> still loaded the table name.
>
>
> Renaming to Accounts.da hid the table from GeTTablenames.
>
> Is this the way it's supposed to be?
>
> JonD
Fri, Oct 12 2007 2:03 AMPermanent Link

Eryk Bottomley
Jon,

> In doing some error checking of an application I wanted to
> temporarily hide a data table so I did a rename
> from Accounts.dat
>  to Accounts.datx
>
> The following
> session.GetTableNames(gDatabaseName, lStr);
> still loaded the table name.
>
>
> Renaming to Accounts.da hid the table from GeTTablenames.
>
> Is this the way it's supposed to be?


Yes, that is normal operating system behaviour. The reason is that the
Win32 API call 'FindFirstFile' (which is what GetTableNames boils down
to under the hood) searches both the full filename and the 'short'
version that was implemented for 16 bit compatibility when the 8.3 limit
was originally broken. Accounts.datx becomes ACCOUN~1.DAT after
transformation and therefore matches the '*.DAT' file mask that DBISAM
is passing - 'Accounts.da' does not match however (you can view the
short filenames with DIR /X).

Eryk
Fri, Oct 12 2007 9:50 AMPermanent Link

Jon Lloyd Duerdoth
Eryk

Well as along as I learn at least one new thing a day I'm
happy....

Thanks Eryk

Eryk Bottomley wrote:
> Jon,
>
>> In doing some error checking of an application I wanted to
>> temporarily hide a data table so I did a rename
>> from Accounts.dat
>>  to Accounts.datx
>>
>> The following
>> session.GetTableNames(gDatabaseName, lStr);
>> still loaded the table name.
>>
>>
>> Renaming to Accounts.da hid the table from GeTTablenames.
>>
>> Is this the way it's supposed to be?
>
>
> Yes, that is normal operating system behaviour. The reason is that the
> Win32 API call 'FindFirstFile' (which is what GetTableNames boils down
> to under the hood) searches both the full filename and the 'short'
> version that was implemented for 16 bit compatibility when the 8.3 limit
> was originally broken. Accounts.datx becomes ACCOUN~1.DAT after
> transformation and therefore matches the '*.DAT' file mask that DBISAM
> is passing - 'Accounts.da' does not match however (you can view the
> short filenames with DIR /X).
>
> Eryk
Image