Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Making a copy of a cursor with a range |
Thu, Nov 2 2006 12:51 PM | Permanent Link |
Sean McCall | Tim,
Is there a way to creating second TDBISAMTable cursor that is an exact duplicate of another including any range? I can get the table info & the filters copied, but don't know how to copy the range. Something like: function CloneCursor(ATable: TDBISAMTable): TDBISAMTable; begin Result := TDBISAMTable.Create(ATable.Owner); Result.TableName := ATable.TableName; Result.DatabaseName := ATable.DatabaseName; Result.Filter := ATable.Filter; Result.Filtered := ATable.Filtered; (* HOW DO I COPY THE RANGE? *) end; Or will I have to keep track of the range I set in the first table & then reproduce it when I make the cloned cursor? Thanks, Sean |
Thu, Nov 2 2006 11:01 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sean,
<< Is there a way to creating second TDBISAMTable cursor that is an exact duplicate of another including any range? I can get the table info & the filters copied, but don't know how to copy the range. >> You could try using EditRangeStart and EditRangeEnd - they will give you FieldByName() access to the fields that are assigned values in the current range. You'll have to then go ahead an call ApplyRange again to keep the existing range set, but that may or may not matter. -- Tim Young Elevate Software www.elevatesoft.com |
Fri, Nov 3 2006 9:37 AM | Permanent Link |
Sean McCall | Tim,
Will the ApplyRange call change the record position in the dataset? For that matter, does apply range always automatically move the cursor to the first record of the range? Thanks, Sean Tim Young [Elevate Software] wrote: > Sean, > > << Is there a way to creating second TDBISAMTable cursor that is an exact > duplicate of another including any range? I can get the table info & the > filters copied, but don't know how to copy the range. >> > > You could try using EditRangeStart and EditRangeEnd - they will give you > FieldByName() access to the fields that are assigned values in the current > range. You'll have to then go ahead an call ApplyRange again to keep the > existing range set, but that may or may not matter. > |
Fri, Nov 3 2006 7:13 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sean,
<< Will the ApplyRange call change the record position in the dataset? >> Possibly. << For that matter, does apply range always automatically move the cursor to the first record of the range? >> Yes. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Sunday, May 19, 2024 at 08:46 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |