Jump to content

Upgrade From TrueDBGrid 6.0 to TrueDBGrid 7.0


AlbertoEspinoza

Recommended Posts

  • Mobilize.Net Staff

Upgrade from TDBG 6 to TDBG 7

Summary

The Visual Basic Upgrade Companion supports TrueDBGrid 7.0 and later versions, but not TrueDBGrid version 6.0. To migrate code containing version 6 controls, you must first upgrade TDBG 6.0 to TDBG 7.0

Problem Description

TrueDBGrid 6.0 defines some properties of the grid in the frx file, while TrueDBGrid 7.0 defines them in the frm file.

When a project in Visual Basic has a form, which contains a grid of type True DB Grid 6.0, some characteristics, such as properties of columns, positions, and more are defined in the form's frx file. Since the VBUC will only take the properties defined in the frm file, those properties embedded in the frx file are not migrated. So, to solve this issue, first migrate the version 6.0 controls to version 7.0 prior to migration with VBUC.

How to Upgrade to Version 7

  1. In your VB6 development machine, install TrueDBGrid 7.0
    1. You can get an evaluation from this link: http://download.componentone.com/pub/truedbgridpro7/eval
  2. Copy to C:\Windows\System32 the next dll: tdbg8mu.dll
    1. You can get it from this link: http://gccontent.blob.core.windows.net/gccontent/blogs/legacy/c1/2011/07/tdbg8mu1_utility.zip
  3. Register that DLL using regsvr32
  4. Modify the file C:\Windows\vbaddin.ini adding the next line: TDBG7MU.Connect=2
  5. In Visual Basic 6, on the
    menu Add-Ins/Add-in select the option "Load on startup" for "TrueDBGrid 7.0 Migration Utility"
  6. Restart Visual Basic
  7. The following button will appear on the upper menu:   image.png
  8. Upgrade from TrueDBGrid 6.0 to TrueDBGrid 7.0 and from TrueDBGrid (OLEDB) 6.0 to TrueDBGrid (OLEDB) 7.0 (if applies)
  9. Open each form and press CTRL + S to save all changes
  10. Check that each form has changed, for example:                                                                        image.png

Sometimes the changes won't be applied to the forms, if that happens some workaround will be needed:

  1. Add a grid (Version 7.0) on the form
  2. Save the form
  3. Delete the grid
  4. Save again
  5. Check changes were applied to the forms

Post-migration to .NET

After the migration to .NET, in C# some visual elements may need correcting. For example, 

This is how a grid should look after the migration using version 7 of TrueDBGrid:

image.png

Because the designer file loaded incompletely, this is how the grid looks after the migration (column width incorrect):

image.png

The following steps can fix these kinds of problems:

  1. Modify any property of the grid, like changing the position of an element or modifying the name of the grid. These changes should be done in the code of the designer file (designer.cs)
  2. Save and close all files
  3. Re-open the form: the grid should look correct
  4. If it's necessary, don't forget to undo all changes previously applied to the designer file.

This workaround is needed because sometimes the designer isn't correctly rendered in the form, so when a new change is applied, it needs to load all the designer settings.

Upgrade from TDBG 6.0 to TDBG 7.0.pdf

Edited by AlbertoEspinoza
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use