Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 7 of 7 total
Thread Upgrade from DBISAM 3 to 4, but still need to support ver 3
Wed, May 9 2007 12:26 PMPermanent Link

Bryan Ray
Hello,

I've purchased DBISAM ver 3 and now 4.

My question:
I have legacy applications that still use tables from ver 3.x, and I don't intend to upgrade those apps so they will be compatible with
ver 4.x.

I was planning on still using a mix of ver 3.x and 4.x tables in my latest application so I can have backwards compatibility with my
older apps.

All of the 3.x tables are stored on a web server and downloaded by my client app when needed.

What is the best way to handle ver 3.x tables with my ver 4.x application?
I was thinking of upgrading each table as the 4.x application needs them (as they are downloaded).  That way, when my older 3.x
DBISAM app downloads the tables, they are still compatible.

Is this the best way, and what are the considerations I should take into account when doing this?

Thanks!
Bryan
Wed, May 9 2007 1:44 PMPermanent Link

"Robert"

"Bryan Ray" <bryanray67@hotmail.com> wrote in message
news:EFAF3B7E-B57E-4A21-BC65-7E7806904A8C@news.elevatesoft.com...
>
> Is this the best way,

As long as you don't have to save the reuslt back in V3.

Robert

Wed, May 9 2007 1:54 PMPermanent Link

Bryan Ray
Hi Robert,
I will not have to save back into V3.
Will there be a significant performance hit to check and upgrade each table as I need?

Thanks again,
Bryan

"Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote:


"Bryan Ray" <bryanray67@hotmail.com> wrote in message
news:EFAF3B7E-B57E-4A21-BC65-7E7806904A8C@news.elevatesoft.com...
>
> Is this the best way,

As long as you don't have to save the reuslt back in V3.

Robert

Wed, May 9 2007 5:30 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Bryan,

<< Will there be a significant performance hit to check and upgrade each
table as I need? >>

How big are the tables ?

--
Tim Young
Elevate Software
www.elevatesoft.com

Thu, May 10 2007 5:35 AMPermanent Link

> Will there be a significant performance hit to check and upgrade each
> table as I need?

I'd say no. I use code that I got from these groups ages ago: (the tabs
have gone horrible, but format it nicely and this works for me!) Actually,
I also added a retry facility which allows my backup system to complete,
but you could remove that part.

In essence, you just open the table. If it is old, an exception occurs and
you do the upgrade. Once done, it just opens next time.

procedure TmodDatabase.SafeOpen(xTable : TDBISAMTable);
const
 ERRBASE_DATACORRUPT           = $2300;  { Physical Data Corruption }
var
   nLoop : Integer;
begin
   for nLoop := 1 to 15 do
   begin
      try
         xTable.Open;
         exit;
      except
      on E:EDBISAMEngineError do
         begin
            case EDBISAMEngineError(E).ErrorCode of
            DBISAM_OLDVERSION:
               begin
                  xTable.Exclusive := True;
                  Report('Upgrading table to
new database version.');
                  xTable.UpgradeTable;
                  xTable.Exclusive := False;
                  try
                     xTable.Active :=
True;
                  except
                     on errInfo :
Exception do
                        Report
('Error: ' + errInfo.Message);
                  end;
               end;

            ERRBASE_DATACORRUPT:
   //         DBISAM_HEADERCORRUPT,
   //         DBISAM_FILECORRUPT,
   //         DBISAM_MEMOCORRUPT,
   //         DBISAM_INDEXCORRUPT:
               begin
                  xTable.RepairTable
{(True)};
                  try
                     xTable.Active :=
True;
                  except
                     on
E:EDBISAMEngineError do
                     begin
                        // swallow
result
                     end;
                  end;
               end;
            end;
         end;
      end;
      Sleep(2000);   // wait a little while for backup to pass
over
   end;
   xTable.Open;   // let it go, and generate error
end;


/Matthew Jones/
Thu, May 10 2007 3:28 PMPermanent Link

"Robert"

"Bryan Ray" <bryanray67@hotmail.com> wrote in message
news:77EA8833-1D0C-4D66-AA4F-4D7486F1E5D7@news.elevatesoft.com...
> Hi Robert,
> I will not have to save back into V3.
> Will there be a significant performance hit to check and upgrade each
> table as I need?
>

Upgrade them with DBSYS, and you'll get a good feel for how long it takes.

Robert


Thu, May 10 2007 7:25 PMPermanent Link

Bryan Ray
All,

Thank you for your replies, suggestions, and sample code... I well on my way...

Cheers,
Bryan

"Robert" <ngsemail2005withoutthis@yahoo.com.ar> wrote:


"Bryan Ray" <bryanray67@hotmail.com> wrote in message
news:77EA8833-1D0C-4D66-AA4F-4D7486F1E5D7@news.elevatesoft.com...
> Hi Robert,
> I will not have to save back into V3.
> Will there be a significant performance hit to check and upgrade each
> table as I need?
>

Upgrade them with DBSYS, and you'll get a good feel for how long it takes.

Robert


Image