Table contains a value in a Code field that cannot be used

eYeeYe Member Posts: 168
Hi,

I am trying to restore a client's db to NAV2009 SP1 SQL. I suspect the created a vendor with the special characters in the Name field, so that then updated the Search Name field.
Backup was made and now when restoring it I get the following:
The Vendor table contains a value in a Code field that cannot be used with Microsoft Dynamics NAV Classic:
Field: Search Name
Value: COMPAÑõA

So I changed the Search Name to Text, hoping that I will be able to restore and then change it back to code afterwards, but even with the field set to Text, I still get this message.
Kind Regards,
Ewald Venter

Comments

  • rhpntrhpnt Member Posts: 688
    How was the backup made?
  • eYeeYe Member Posts: 168
    Through NAV client, .fbk file
    Kind Regards,
    Ewald Venter
  • rhpntrhpnt Member Posts: 688
    The backup DB was also on a SQL Server?
  • eYeeYe Member Posts: 168
    Yes
    Kind Regards,
    Ewald Venter
  • rhpntrhpnt Member Posts: 688
    My wild guess is that you have a collation and regional settings problem.
  • JedrzejTJedrzejT Member Posts: 267
    Hello,

    Check in Database->Alter , all settings in Tab -> Collation. Must be te same in both database.
    This problem can occurs when You restore backup to database with other collation settings.
  • eYeeYe Member Posts: 168
    Hi,

    Thanks, I also thought that was the problem, but it was just confirmed that the collation for the 2 databases are the same.
    ](*,)

    Restore to native database works though... so it is some SQL setting?
    Kind Regards,
    Ewald Venter
  • rhpntrhpnt Member Posts: 688
    I presume that the restoring DB is on a new machine/server. Double check the collation again and also check the regional settings and input locale of the operating system. Also check the setting "File->Database->Alter->Collation(page)->Validate Code Page". Look up the purpose of this setting in NAV online help.
  • dmccraedmccrae Member, Microsoft Employee Posts: 144
    When you make a NAV backup (fbk) the character data in the backup is based on the OEM code page of that machine (this is based on the Non-Unicode setting in Regional Settings). It is not based on the Format country in Regional Settings, or the keyboard/language.

    When you restore that backup you must ensure that the setting is the same at restore time - if it is on a different machine it might not be the same of course.

    Unfortunately NAV does not check that the settings are the same, and extended characters will undergo a transformation now in the wrong code page.

    The database collation will not be a problem here because NAV won't let you open a database from a client with different code pages (provided that you don't untick the Validate Code Page setting).
    Dean McCrae - Senior Software Developer, NAV Server & Tools

    This posting is provided "AS IS" with no warranties, and confers no rights.
Sign In or Register to comment.