This will not work (readonly)!
Table1.FieldDefs.items[1].size:=newSize;
Thanks
Martin
the dbiDoRestructure procedure. There are help files for this...you can
figure it from the help files..but it is not a trivial task. You will
also want to look at the BDE.int and BDEConst.int files (in the "Docs"
directory).
What I would do is load up Database Explorer and use SQL. The
following snippet shows how to increase a field's size (in the below
example the COMMENTS field of the MARTINTABLE table by creating a
temporary larger-size-field, copying all the values to it, destroying
the old field, re-creating the new field with a bigger size, copying
the bigger-sized temp field contents to the new bigger "real" field,
then cleaning up the temporary field (whew):
ALTER TABLE MARTINTABLE
ADD string1 CHAR(500);
UPDATE MARTINTABLE
SET string1 = COMMENTS;
ALTER TABLE MARTINTABLE
DROP COMMENTS;
ALTER TABLE MARTINTABLE
ADD COMMENTS CHAR(500);
UPDATE MARTINTABLE
SET COMMENTS = string1;
ALTER TABLE MARTINTABLE
DROP string1;
Good luck,
-Peter
Ed Dressel
--
Bill Todd
(Sorry but TeamB cannot answer questions received via email)
(Remove nospam from my email address to contact me for any other reason)