Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB General » View Thread |
Messages 1 to 5 of 5 total |
Migration big problem.... DbIsam->RecordID |
Thu, Sep 11 2008 6:32 AM | Permanent Link |
"Mauro Botta" | Hi
i have make a Migration from DbIsam to EDB2 when EDB have created my EDB tables have trasformed a PrimaryKey RecordID ( Hidden Field in DbIsam ) in a True ( autogenerated ) fields. now.... in my big application ( 500 dfm ) all for i := 0 to tblTemp.FieldDefs.Count - 1 do tblTemp.FieldByName(tblTemp.FieldDefs[i].Name).AsString := sTemp; go in error , because the first new field is : RecordID and is unique ( error : Duplicate Primary Key !!! ) Can i have this new field HIDDEN ? or i must modify all 500 table for remove this field / pm key after the MIGRATION ? |
Thu, Sep 11 2008 2:56 PM | Permanent Link |
Heiko Knuettel | Mauro,
it can't be hidden. Why don't you exclude the field with an "if tblTemp.FieldDefs[i].Name <> 'RecordID' then ..." in your loop ? Heiko |
Thu, Sep 11 2008 5:52 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Heiko,
<< Can i have this new field HIDDEN ? >> Unfortunately it cannot be hidden. Heiko's suggestion for a workaround should work for you, or you can simply just drop any primary keys in your newly-migrated EDB tables that use just the RecordID column along with the RecordID column and simply have no primary key for these tables. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Sep 12 2008 3:43 AM | Permanent Link |
"Mauro Botta" | > Why don't you exclude the field with an "if tblTemp.FieldDefs[i].Name <>
> 'RecordID' then > .." in your loop ? because i have 20 MB of sources and 10000000 loop with : tblTemp.FieldDefs[i].AsString := .. . . |
Fri, Sep 12 2008 10:15 AM | Permanent Link |
Heiko Knuettel | Mauro,
I see. If you really don't want to alter your tables, maybe something like this works for you (untested) : TmyEDBTable = class(TEDBTable) protected procedure InternalPost; override; end; procedure TmyEDBTable.InternalPost; var i: integer; begin for i := 0 to Fields.Count - 1 do begin if Fields[i].FieldName = 'RecordID' then Fields[i].Value := Fields[i].OldValue; end; inherited; end; |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |