Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Table Restructuring |
Thu, Feb 23 2006 4:57 PM | Permanent Link |
"Jonas Wik" | We are having a problem when we try and restructure our tables. If you add
or remove a field the information in that field does not move, the field just changes. So if Field[1] is a String and when we restructure the table Field[1] is an Integer we get an error that the string is not a valid integer. I was wondering if there is something i can do that when we restructure the field we can move the whole field to that position or does the restructure just change the field type. |
Fri, Feb 24 2006 1:34 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jonas,
<< We are having a problem when we try and restructure our tables. If you add or remove a field the information in that field does not move, the field just changes. So if Field[1] is a String and when we restructure the table Field[1] is an Integer we get an error that the string is not a valid integer. I was wondering if there is something i can do that when we restructure the field we can move the whole field to that position or does the restructure just change the field type. >> If you could post the code that you're using, I could give you some more pointers on how to get it to do what you want. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 24 2006 5:49 PM | Permanent Link |
"Jonas Wik" | the code is,
FieldDefs.Clear for ndx := 0 to FieldCount - 1 do begin tblDef := TObject( TheDefs.Objects[ndx] ) as tSamFieldDef; Add(TblDef.FieldName, TblDef.FieldType, TblDef.FieldLength, TblDef.Required); end; "Tim Young [Elevate Software]" <timyoung@elevatesoft.com> wrote in message news:A0F188F8-B6B7-4868-9A27-8F675EE2AB33@news.elevatesoft.com... > Jonas, > > << We are having a problem when we try and restructure our tables. If you > add or remove a field the information in that field does not move, the > field just changes. So if Field[1] is a String and when we restructure the > table Field[1] is an Integer we get an error that the string is not a > valid integer. I was wondering if there is something i can do that when > we restructure the field we can move the whole field to that position or > does the restructure just change the field type. >> > > If you could post the code that you're using, I could give you some more > pointers on how to get it to do what you want. > > -- > Tim Young > Elevate Software > www.elevatesoft.com > > |
Mon, Feb 27 2006 6:55 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Jonas,
<< the code is, FieldDefs.Clear for ndx := 0 to FieldCount - 1 do begin tblDef := TObject( TheDefs.Objects[ndx] ) as tSamFieldDef; Add(TblDef.FieldName, TblDef.FieldType, TblDef.FieldLength, TblDef.Required); end; >> Okay, if you're maintaining the structure in your own objects and you want to maintain the proper relationship back to the original field definitions, even if they are moved, then you need to also store and specify the FieldNo for each field. Are you using DBISAM 3.x or 4.x ? -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, April 24, 2024 at 11:07 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |