Skip to content

Sage 50 US Troubleshooting

'There was a problem connecting to Sage 50 US' error

When connecting to Sage 50 US after upgrading to Version 2024.0.1 you may see the following error:

There was a problem connecting to Sage 50 US.

Could not load file or assembly 'Sage.Collaboration, Version=2024.0.0.99, Culture=neutral, PublicKeyToken=d06c16dde04d83e4' or one of its dependencies. The system cannot find the file specified.

To resolve this issue you will need to update the Zynk.exe.config file which resides in the Zynk install directory to include an assembly binding to the correct version of the Sage 50 US DLLs.

This is normally located at - C:\Program Files (x86)\Zynk Software\Zynk\3.0\Zynk.exe.config

The following snippet will need to be added to configuration/runtime/assemblyBinding within the config file:

<dependentAssembly>
    <assemblyIdentity 
        name="Sage.Collaboration" 
        publicKeyToken="d06c16dde04d83e4" 
        culture="neutral" />
    <bindingRedirect 
        oldVersion="0.0.0.0-2024.0.0.99" 
        newVersion="2024.0.01.0110" />
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity 
        name="Sage.Collaboration.Common" 
        publicKeyToken="d06c16dde04d83e4" 
        culture="neutral" />
    <bindingRedirect 
        oldVersion="0.0.0.0-2024.0.0.99" 
        newVersion="2024.0.01.0110" />
</dependentAssembly>
<dependentAssembly>
    <assemblyIdentity 
        name="Sage.Peachtree.InterOp.Managed" 
        publicKeyToken="d06c16dde04d83e4" 
        culture="neutral" />
    <bindingRedirect 
        oldVersion="0.0.0.0-2024.0.0.99" 
        newVersion="2024.0.01.0110" />
</dependentAssembly>

Target Of Invocation error

After updating Sage 50 US and upgrading the connection within Zynk, there is a known issue that may result in a Target of Invocation error. This is caused by the Sage Peachtree.ini file located at C:\ProgramData\Sage\Peachtree\peachtree310.ini not having the correct DATAPATH inside it. Ensure that the correct datapath is populated within that file.

~PVSW~.LOC file is in use

After resolving the above issue, you may get a message saying that ~PSVW~.LOC is in use when trying to connect to Sage 50 US. ~PVSW~.LOC is a file located within C:\Program Files (x86)\Sage\Peachtree which contains the name of the computer that holds the master accounting data.

In order to indicate what computer is the master Peachtree creates a file in the company folder named "~PVSW~.LOC". (PVSW = PerVasive SoftWare, now Actian Zen) This is a text file and contains the name of the computer that is the master.

Actian Zen Workgroup Service is a database management system which Sage 50 US uses in order to store and manage data. This is the service that holds the lock on the .LOC file. This file should be Read Only in order for Actian to not hold a lock on it. Zynk needs to be able to read this file along with Actian to connect to Sage 50 US. Once the file has been made Read Only, we recommend you restart Zynk and try to create the connection once more.

If any of the above doesn't work feel free to email [email protected] and one of our support team can look into it for you.

Invalid user authorization specification

This error can occur when Zynk tries to use the ODBC connection to Sage 50 US, most commonly when using the Export Inventory V2 task.

The full error is as follows:

ERROR [28000] [Zen][ODBC Client Interface][LNA][Zen][SQL Engine][Data Record Manager]Invalid user authorization specification.
ERROR [28000] [Zen][ODBC Client Interface][LNA][Zen][SQL Engine][Data Record Manager]Invalid user authorization specification.
   at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCode retcode)
   at System.Data.Odbc.OdbcConnectionHandle..ctor(OdbcConnection connection, OdbcConnectionString constr, OdbcEnvironmentHandle environmentHandle)
   at System.Data.Odbc.OdbcConnectionOpen..ctor(OdbcConnection outerConnection, OdbcConnectionString connectionOptions)
   at System.Data.Odbc.OdbcConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
   at System.Data.ProviderBase.DbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
   at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
   at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
   at System.Data.Odbc.OdbcConnection.Open()
   at Zynk.ERP.Sage50USV2024_0.Tasks.BaseOdbcExportRuntime`1.RunSageInternal[T](T task, IProgress progress, ILog log, ZynkObject input)
   at Zynk.ERP.Sage50USV2024_0.Tasks.ExportInventoryV2Runtime.RunSageInternal[T](T task, IProgress progress, ILog log, ZynkObject input)
   at Zynk.ERP.Sage50USV2024_0.Tasks.BaseTaskRuntime.Run[T](T task, IProgress progress, ILog log, ZynkObject input)

To resolve this, you must enable the "Crystal Reports/Data Access" feature within Sage. This can be found under Maintain > Users > Set up security > Data Access.

Sage 50 US Crystal Reports

Note

Where possible, we recommend only using alphanumeric characters for this password, as special characters such as exclamations and quote marks can cause issues when connecting to Sage.

Once this is enabled, enter the password you've chosen into the Sage 50 US Connection Wizard

Sage 50 US Connection Wizard

Truth records not found after upgrading to the versionless connector

Older releases of the Sage 50 US connector were tied to a specific Sage version, and each one wrote truth records under its own object type. For example, the 2024.0.1 connector recorded sales orders as:

Zynk.ERP.Sage50USV2024_0.Objects.SalesOrder

The versionless (V2) connector described in Supported Versions uses a single type for each object, regardless of which release of Sage 50 US you are running:

Zynk.ERP.Sage50USV2.Objects.SalesOrder

Truth records created before the upgrade keep their original type, so any lookup performed by the V2 tasks — or by an If Truth Record Exists task or the Truth functions in a mapping — will not match them. Typical symptoms are:

  • Records that were already sent to Sage are exported and created a second time, resulting in duplicates.
  • GetInternalId / GetExternalId return nothing, so the ID of the record in Sage cannot be written back to the source system.

Resolution

Update the existing truth records so that their Type values use the versionless format. This is a one-off change: once the records have been updated, the V2 tasks will match them as normal.

Warning

This modifies the truth table directly. Close Zynk, disable any scheduled tasks that run your workflows, and take a backup of your database (Zynk.db or Zynk.sdf in C:\ProgramData\Zynk Software\Zynk\3.0\Resources, or your bespoke data directory) before running the statement below. See Backup & Restore for more information.

You can run the statement using the Zynk Log Manager extension:

UPDATE Truth 
SET Type = CASE 
    WHEN Type = 'Zynk.ERP.Sage50USV2024_0.Objects.PurchaseOrder' THEN 'Zynk.ERP.Sage50USV2.Objects.PurchaseOrder'
    WHEN Type = 'Zynk.ERP.Sage50USV2024_0.Objects.Customer'      THEN 'Zynk.ERP.Sage50USV2.Objects.Customer'
    WHEN Type = 'Zynk.ERP.Sage50USV2024_0.Objects.Vendor'        THEN 'Zynk.ERP.Sage50USV2.Objects.Vendor'
    WHEN Type = 'Zynk.ERP.Sage50USV2024_0.Objects.SalesOrder'    THEN 'Zynk.ERP.Sage50USV2.Objects.SalesOrder'
    WHEN Type = 'Zynk.ERP.Sage50USV2024_0.Objects.SalesInvoice'  THEN 'Zynk.ERP.Sage50USV2.Objects.SalesInvoice'
    ELSE Type 
END
WHERE Type IN (
    'Zynk.ERP.Sage50USV2024_0.Objects.PurchaseOrder',
    'Zynk.ERP.Sage50USV2024_0.Objects.Customer',
    'Zynk.ERP.Sage50USV2024_0.Objects.Vendor',
    'Zynk.ERP.Sage50USV2024_0.Objects.SalesOrder',
    'Zynk.ERP.Sage50USV2024_0.Objects.SalesInvoice'
);

Note

The statement above covers an upgrade from the 2024.0.1 connector. If you are upgrading from a different release, replace Sage50USV2024_0 with the version you were previously running, for example Sage50USV2023_0. To check which types are present in your database, run:

SELECT DISTINCT Type FROM Truth WHERE Type LIKE 'Zynk.ERP.Sage50US%';

The list of object names may also differ depending on which tasks your workflows use — the statement only needs to cover the object types you actually have.

Mappings

If any of your XSLT mappings pass a Sage 50 US object type into a truth function, or into the Type setting of a truth record task, those values also need changing to the Zynk.ERP.Sage50USV2.Objects.* format. Otherwise the lookups will continue to search for the old type and return no results.