![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 2 of 2 total |
![]() |
Thu, Sep 18 2008 8:17 PM | Permanent Link |
Roger Ruiz | Hi
I need modify primary index with the next code: with tblCust do if IndexDefs.Items[0].Fields='RecordId' then // Check index primary begin IndexDefs.Items[0].Fields:='Number'; // Change value for field Number AlterTable; // This line is executed within error and nothing, no change index end; The table only have a index primary. Thanks Roger |
Fri, Sep 19 2008 6:39 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Roger,
<< I need modify primary index with the next code: with tblCust do if IndexDefs.Items[0].Fields='RecordId' then // Check index primary begin IndexDefs.Items[0].Fields:='Number'; // Change value for field Number AlterTable; // This line is executed within error and nothing, no change index end; The table only have a index primary. >> Are you using DBISAM 4.x ? If so, then the above code should work provided that you include these two lines at the beginning: with tblCust do FieldDefs.Update; <<<<<<<<<< IndexDefs.Update; <<<<<<<<<< if IndexDefs.Items[0].Fields='RecordId' then // Check index primary begin IndexDefs.Items[0].Fields:='Number'; // Change value for field Number AlterTable; // This line is executed within error and nothing, no change index end; -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 03:12 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |