Previous | Index | Next 

[PRB] The migrated VB.NET has a “Name ‘xyz’ is not declared” compilation error

VB6 controls ignore the value assigned to the DataSource property if the value doesn’t correspond to an existing data source. Conversely, a control whose DataSource property doesn’t point to an existing object prevents the VB.NET application from compiling. The error message reads

    Name 'xyz' is not declared”

where xyz is the value assigned to the DataSource property.

The workaround is trivial: just fix the problem in the VB6 application by blanking the offending DataSource property. It is clearly a logical error in the original application and we don’t consider this as a VB Migration Partner’s shortcoming.


Previous | Index | Next