Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Restructure Table DBISam 3
Thu, Jun 21 2007 12:24 PMPermanent Link

John
Hello,

I need to restructure a dbisam table by code (with a TDBIsamTable),
because when I empty a table an autoincfield doesn't restart at zero.

it seems that restructure method need a lot of parameters, can you help
me a little?

I don't need to modify the structure, only restructuring for making the
autoinc field starting again at zero...

Thanks

John
Thu, Jun 21 2007 3:06 PMPermanent Link

"Ralf Graap"
Hey John,

try SQL:

ALTER TABLE [Tablename] LAST AUTOINC 0

I love it Smile

Ralf


"John" <noSpam@noSpam.com> schrieb im Newsbeitrag
news:6E81477E-3C56-4EC4-BC38-2C8478C2BECC@news.elevatesoft.com...
> Hello,
>
> I need to restructure a dbisam table by code (with a TDBIsamTable),
> because when I empty a table an autoincfield doesn't restart at zero.
>
> it seems that restructure method need a lot of parameters, can you help me
> a little?
>
> I don't need to modify the structure, only restructuring for making the
> autoinc field starting again at zero...

Fri, Jun 22 2007 6:39 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

John,

<< it seems that restructure method need a lot of parameters, can you help
me a little? >>

Use this code:

with DBISAMTable do
    begin
    RestructureFieldDefs.Update;
    RestructureIndexDefs.Update;.
    RestructureTable(LanguageID,SortID,UserMajorVersion,UserMinorVersion,
                              Encrypted,Password,Description,BlobBlockSize,0,False);
    end;

--
Tim Young
Elevate Software
www.elevatesoft.com

Mon, Jun 25 2007 9:18 AMPermanent Link

John
Thanks Ralf and Tim
Image