Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 5 of 5 total
Thread resize a stringfield
Thu, Nov 29 2007 8:43 AMPermanent Link

"Erik"
Hi,

(dbisam 4.24)

Can I use tdbisamtable to alter the size of a stringfield in a table ( and
how ?) or does I have to use tdbisamquery to alter the field ?

I have found in the manual to add a field, but not how to change the size of
it.


thanks in advance

regards

Erik

Thu, Nov 29 2007 8:53 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Erik


You can do, but its so long ago I did that I can't remember how. The sql route is much easier.

Roy Lambert
Thu, Nov 29 2007 3:26 PMPermanent Link

"Iztok Lajovic"
Erik,

you can use as model the code made by reverse engineerig. Here is an example
what we use for table 'TableName' restructure from minor version 6 to
version 7 changing size of string file from 30 to 40:

   with TableToCreate do begin
     DatabaseName := CreateDatabaseName;
     TableName := 'TableName';
     Exclusive := True;
     if (userMajorVersion = 1) and (userMinorVersion = 6) then begin
       FieldDefs.Update;
       IndexDefs.update;
       fieldDefs.Items[fieldDefs.IndexOf('NameOfStringField')].Size := 40;
       AlterTable(1, 1, 7, False, '', 'description of table', 4096, 512);
     end;
  end;

HTH
Iztok Lajovic



"Erik" <bellaard@wega.nl> je napisal v sporočilo
news:C6447A71-DFCC-4657-BC26-216B18EB1E75@news.elevatesoft.com ...
> Hi,
>
> (dbisam 4.24)
>
> Can I use tdbisamtable to alter the size of a stringfield in a table ( and
> how ?) or does I have to use tdbisamquery to alter the field ?
>
> I have found in the manual to add a field, but not how to change the size
> of it.
>
>
> thanks in advance
>
> regards
>
> Erik
>

Thu, Nov 29 2007 4:16 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erik,

<< Can I use tdbisamtable to alter the size of a stringfield in a table (
and how ?) or does I have to use tdbisamquery to alter the field ? >>

Iztok's answer is spot-on.

--
Tim Young
Elevate Software
www.elevatesoft.com

Fri, Nov 30 2007 2:01 AMPermanent Link

"Erik"
Thanks !!!

Erik

"Iztok Lajovic" <iztok.lajovic@amis.net> schreef in bericht
news:45B06083-7CEE-4EA3-BCFF-E01ACD82BEBD@news.elevatesoft.com...
> Erik,
>
> you can use as model the code made by reverse engineerig. Here is an
> example what we use for table 'TableName' restructure from minor version 6
> to version 7 changing size of string file from 30 to 40:
>
>    with TableToCreate do begin
>      DatabaseName := CreateDatabaseName;
>      TableName := 'TableName';
>      Exclusive := True;
>      if (userMajorVersion = 1) and (userMinorVersion = 6) then begin
>        FieldDefs.Update;
>        IndexDefs.update;
>        fieldDefs.Items[fieldDefs.IndexOf('NameOfStringField')].Size := 40;
>        AlterTable(1, 1, 7, False, '', 'description of table', 4096, 512);
>      end;
>   end;
>
> HTH
> Iztok Lajovic
>
>
>
> "Erik" <bellaard@wega.nl> je napisal v sporočilo
> news:C6447A71-DFCC-4657-BC26-216B18EB1E75@news.elevatesoft.com ...
>> Hi,
>>
>> (dbisam 4.24)
>>
>> Can I use tdbisamtable to alter the size of a stringfield in a table (
>> and how ?) or does I have to use tdbisamquery to alter the field ?
>>
>> I have found in the manual to add a field, but not how to change the size
>> of it.
>>
>>
>> thanks in advance
>>
>> regards
>>
>> Erik
>>
>
>

Image