Board index » delphi » TTABLE.CREATETABLE duplicates fields size in ACCESS 2000 databases

TTABLE.CREATETABLE duplicates fields size in ACCESS 2000 databases

I have a ACCESS 2000 database and use D5.

First, at desing time, I set the TABLENAME propriety to a default table and
updated fields definitions.

I coult realize, in FieldDefs colection, the size of each field was not as I
specified in its structure thru ACCESS 2000. Actually, the sizes were
duplicated.

Then, at runtime, I changed the name of the table and executed the method
CREATETABLE. At this time, a table as created with the new name. But, when I
examined its structure thru ACCESS, the fields sizes were duplicated and
there was no the primary key. Some of these fields were recognized thru D5
as MEMO.

Please Someone help me.

Glad for any help.

 

Re:TTABLE.CREATETABLE duplicates fields size in ACCESS 2000 databases


CreateTable will create the table withthe name given and the fields created will
be whatever is listed in the Tbl.Fields properties.

Douglas de Alencar Barbosa wrote:

Quote
> I have a ACCESS 2000 database and use D5.

> First, at desing time, I set the TABLENAME propriety to a default table and
> updated fields definitions.

> I coult realize, in FieldDefs colection, the size of each field was not as I
> specified in its structure thru ACCESS 2000. Actually, the sizes were
> duplicated.

> Then, at runtime, I changed the name of the table and executed the method
> CREATETABLE. At this time, a table as created with the new name. But, when I
> examined its structure thru ACCESS, the fields sizes were duplicated and
> there was no the primary key. Some of these fields were recognized thru D5
> as MEMO.

> Please Someone help me.

> Glad for any help.

Re:TTABLE.CREATETABLE duplicates fields size in ACCESS 2000 databases


Any field or char fields only?
They're probably created as unicode, which is exactly 2 bytes for one char.
BDE handles all char fields>255 as MEMO.
--
Robert

Douglas de Alencar Barbosa wrote in message <3b97b32e_1@dnews>...

Quote
>I have a ACCESS 2000 database and use D5.

>First, at desing time, I set the TABLENAME propriety to a default table and
>updated fields definitions.

>I coult realize, in FieldDefs colection, the size of each field was not as
I
>specified in its structure thru ACCESS 2000. Actually, the sizes were
>duplicated.

>Then, at runtime, I changed the name of the table and executed the method
>CREATETABLE. At this time, a table as created with the new name. But, when
I
>examined its structure thru ACCESS, the fields sizes were duplicated and
>there was no the primary key. Some of these fields were recognized thru D5
>as MEMO.

>Please Someone help me.

>Glad for any help.

Other Threads