Icon View Incident Report

Serious Serious
Reported By: Jan Weingartner
Reported On: 5/24/2011
For: Version 2.05 Build 7
# 3452 Unicode DBISAM 2.x Migrator Causes Various Errors During Migration

I want to create a database and migrate a DBISAM2 database to ElevateDB (Unicode).

I get an exception (Index out of bounds) on creating the database - please see first statement in the code.
Stack trace:
bei Elevate.ElevateDB.Data.EDBCommand.Prepare()
bei Elevate.ElevateDB.Data.EDBCommand.Execute()
bei Elevate.ElevateDB.Data.EDBCommand.ExecuteNonQuery()
bei ElevateDB.Form1.MigrateBtn_Click(Object sender, EventArgs e) in ....

If the database is created via Elevate DB Manager (Unicode) i get the same exception on executing the second statement (CREATE MODULE...).

using (Elevate.ElevateDB.Data.EDBConnection connection = new
               Elevate.ElevateDB.Data.EDBConnection(@"CONFIGPATH=D:\Devtools\Projects\DotNet\TestProjekte\ElevateDB\DataBase;UID=Administrator;PWD=EDBDefault;DATABASE=Configuration"))
{
   try
   {
       connection.Open();
       using (Elevate.ElevateDB.Data.EDBCommand cmd = new Elevate.ElevateDB.Data.EDBCommand("", connection))
       {
           cmd.CommandText = @"
CREATE DATABASE ""MyDatabase""
PATH 'D:\Devtools\Projects\DotNet\TestProjekte\ElevateDB\DataBase\Data'
DESCRIPTION 'Test Database'
";
           cmd.ExecuteNonQuery();
                       
                       
           cmd.CommandText = @"
CREATE MODULE ""edbmigratedbisam2""
PATH 'C:\Program Files (x86)\ElevateDB 2 ADD\libs\edbmigratedbisam2unicode\edbmigratedbisam2.dll'
--DESCRIPTION 'DBISAM 2 Migrator Module (Unicode)'
";
           cmd.ExecuteNonQuery();

           connection.ChangeDatabase("MyDatabase");

           cmd.CommandText = @"
CREATE MIGRATOR ""DBISAM2ToElevate""
MODULE ""edbmigratedbisam2""
";
           cmd.ExecuteNonQuery();

cmd.CommandText = @"
MIGRATE DATABASE FROM ""DBISAM2ToElevate""
USING DatabaseDirectory = 'C:\Dbisam2Db' , TablePasswords='secret'
WITH DATA
";
           cmd.ExecuteNonQuery();
       }
   }
   finally
   {
       connection.Close();
   }
}



Comments Comments
The problem was with the fact that the DBISAM 2.x migrator was compiled using Delphi 2007, which was causing various issues with WideString usage. Changing the migrator so that it would compile using Delphi 2009 with proper UnicodeString support fixed these issues.


Resolution Resolution
Fixed Problem on 5/25/2011 in version 2.05 build 8


Products Affected Products Affected
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial

Image