Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Iterate through tables in a DataModule |
Tue, Sep 25 2007 10:26 AM | Permanent Link |
"Petter Topp" | I would like to Iterate through the tables of a given DataModule to check if
the state of the tables are "dsEdit" Was thinking of something like this, but I don't have the skill to finish.... procedure TDM_Main.SaveDBSetup; var I: Integer; begin with DM_main do begin for I := 0 to ComponentCount - 1 do if Components[I] is TDbisamTable then begin if ......state = dsEdit then begin Post; end; end; end; end; Regards Petter Topp Dbisam C/S 4 |
Tue, Sep 25 2007 10:43 AM | Permanent Link |
"Robert" | "Petter Topp" <petter.topp@atcdata.no> wrote in message news:0E8642BD-D094-4C65-920F-7604A3E1A31F@news.elevatesoft.com... > if Components[I] is TDbisamTable then begin with Components[I] as TDBISAMTable do begin > if ......state = dsEdit then begin Robert |
Thu, Sep 27 2007 10:48 AM | Permanent Link |
"David Farrell-Garcia" | Petter Topp wrote:
> I would like to Iterate through the tables of a given DataModule to > check if the state of the tables are "dsEdit" Was thinking of > something like this, but I don't have the skill to finish.... Here ya go procedure TDM_Main.SaveDBSetup; var I: Integer; begin with DM_main do begin for I := 0 to ComponentCount - 1 do if Components[I] is TDbisamTable then begin if TDbisamTable(Components[i]).State = dsEdit then begin TDbisamTable(Components[i]).Post; end; end; end; end; -- David Farrell-Garcia Whidbey Island Software, LLC |
Fri, Sep 28 2007 6:00 AM | Permanent Link |
"Petter Topp" | Thank you very much.
Petter "Petter Topp" <petter.topp@atcdata.no> skrev i melding news:0E8642BD-D094-4C65-920F-7604A3E1A31F@news.elevatesoft.com... >I would like to Iterate through the tables of a given DataModule to check >if the state of the tables are "dsEdit" > Was thinking of something like this, but I don't have the skill to > finish.... > > > procedure TDM_Main.SaveDBSetup; > var > I: Integer; > begin > with DM_main do begin > for I := 0 to ComponentCount - 1 do > if Components[I] is TDbisamTable then begin > if ......state = dsEdit then begin > Post; > end; > end; > end; > end; > > Regards > Petter Topp > Dbisam C/S 4 > > |
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 |