Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM General » View Thread |
Messages 1 to 4 of 4 total |
Upgrade old version 3 to 4.00 |
Sun, Apr 19 2009 10:00 AM | Permanent Link |
Lars | Hi
Have following code in my program to check if the table is in different version db_version := '4.00'; if DBISAMTable1.VersionNum <> db_version then begin DBISAMTable1.Close; DBISAMTable1.UpgradeTable; end; But when im running the application windows says that application has stopped working when it comes to upgradetable function. Without the upgradetable it runs well. But want to upgradetable for users that runs the older application with older table. |
Sun, Apr 19 2009 2:25 PM | Permanent Link |
Lars | Lars wrote:
Hi Have following code in my program to check if the table is in different version db_version := '4.00'; if DBISAMTable1.VersionNum <> db_version then begin DBISAMTable1.Close; DBISAMTable1.UpgradeTable; end; But when im running the application windows says that application has stopped working when it comes to upgradetable function. Without the upgradetable it runs well. But want to upgradetable for users that runs the older application with older table. The error is Error # 12035 Table is not the correct version |
Sun, Apr 19 2009 3:52 PM | Permanent Link |
Ralf Graap | Hey Lars,
i use this procedure before i open any table or query. It works very fine for me. Ralf procedure DBISAMUpgradeAllTables(aDB: TDBISAMDatabase; aOnProgress: dbisamtb.TSteppedProgressEvent = nil; aOnLog: dbisamtb.TLogEvent = nil); var StL : TStringList; tbl : TDBISAMTable; ii : integer; aktVer : string; begin StL := TStringList.Create; try aktVer := dbisamtb.Engine.Handle.VersionToStr(dbisamcn.VERSION_NUMBER); aDB.Session.GetTableNames(aDB.DatabaseName, StL); for ii := 0 to StL.Count - 1 do begin tbl := TDBISAMTable.Create(nil); try tbl.TableName := StL[ii]; tbl.DatabaseName := aDB.DatabaseName; tbl.SessionName := aDB.SessionName; tbl.OnUpgradeProgress := aOnProgress; tbl.OnUpgradeLog := aOnLog; tbl.OnRepairProgress := aOnProgress; tbl.OnRepairLog := aOnLog; if tbl.VersionNum <> aktVer then tbl.UpgradeTable; finally FreeAndNil(tbl); end; end; finally FreeAndNil(StL); end; end; { DBISAMUpgrade } Lars schrieb: > Lars wrote: > > Hi > > Have following code in my program to check if the table is in different version > > db_version := '4.00'; > if DBISAMTable1.VersionNum <> db_version then begin > DBISAMTable1.Close; > DBISAMTable1.UpgradeTable; > end; > > But when im running the application windows says that application has stopped working when it comes to upgradetable function. > Without the upgradetable it runs well. But want to upgradetable for users that runs the older application with older table. > > The error is > Error # 12035 Table is not the correct version > |
Mon, Apr 20 2009 12:15 PM | Permanent Link |
Fernando Dias Team Elevate | Lars,
I suspect you are trying to open the table before you attempt to upgrade it and the error message is generated at that time, not when you try the UpgradeTable. Are you sure you are not trying to open the table before the upgrade? -- Fernando Dias [Team Elevate] |
This web page was last updated on Friday, April 19, 2024 at 07:09 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |