convert_1_2 - Taking too long on a larger db?

Barry G. Sumpter BarrySum at BigPond.Net.AU
Thu May 17 19:21:51 CDT 2007


Hi all,

 

I'm using the following code (updated from the Valentina convert_1_2 code
example) 

to test converting a v1 db to a v3 db.

 

Two v1 databases of 1 meg converted immediately without incident.

 

Another that is about 300 megs seems to be taking too long after waiting
about 30 minutes.

 

Any thought?

 

Any positive constructive suggestions would be greatly appreciated.

 

Thanks,

    Barry G. Sumpter

 

REALbasic v 2007 r2

Valentina v3 ADK

Windows XP sp2

 

 

-------

 

 

  dim f as folderitem

  dim fNew as folderItem

  dim DbVersion as Integer

  dim s as string

  

  // obtain folder item for file in the same folder.

  f = GetOpenFolderItem( "" )

  if f = nil then

    stStatus.text = "Selection Cancelled!"

    return

  end if

  

  try

    DbVersion = valentina.GetDatabaseVersion( f )

  Exception err as VException 

    stStatus.text = "Selection Cancelled!"

    MsgBox "Cannot get version for file: " + Str(err.ErrorNumber) + ":" +
err.Message

    return

  end

  

  s = Hex( DbVersion )

  

  // If database is not of 1.x version then return.

  if DbVersion = valentina.GetCurrentFormatVersion() then

    stStatus.text = "Not v1.x Format!"

    MsgBox "you should choose Valentina database of 1.x format"

    return

  end if

  

  stOriginalDB.Text = f.AbsolutePath

  

  fNew = GetFolderItem( "NewDb_vers_2.vdb" )

  

  stConvertedDB.text = fNew.AbsolutePath

  

  stStatus.text = "Converting!    Please Wait..."

  

  

  stStatus.Refresh

  

  Valentina.profile(true) 

  'valentina.Convert_1_2( f, fNew, true, EditField1.text, EditField2.text )

  valentina.Convert_1_2( f, fNew, true)

  Valentina.profile(false)

  

  stStatus.text = "Conversion Successful!!!"

  

  

Exception er as VException 

  stStatus.text = "Conversion Failed"

  

  MsgBox Str(er.ErrorNumber) + ":" + er.Message



More information about the Valentina mailing list