Error 2006: "Could not convert variant of type (Null) into type (OleStr)" when Opening a Sales Document

Overview

Customers may receive the following error when opening a Sales Quote document: 

Error occurred while processing Request
Error Number: 2006
Error Message: Could not convert variant of type (Null) into type (OleStr)

image-0.png

Solution

Performing the following steps requires access to the Everest database. 

Make sure to take the full backup of the invoices table from the database before executing any UPDATE or DELETE statements.

  1. Open SSMS (SQL Server Management Studio) on the server hosting the Everest application.
  2. Connect to the Everest Database with a user with sufficient permissions to execute UPDATE SQL statements on the invoices table. 
  3. In the database, check the details of the document by going to the invoices table >  cust_code. The cust_code is most likely set to null.
  4. Run the following SQL Statements (add the number of the invoice that caused the error):
    1. Retrieve the code for the document:
      SELECT cust_code,* 
      FROM invoices WHERE doc_no='[Invoice Number]' AND status = 7
    2. Run the following query using the code retrieved in the previous step:
      UPDATE invoices 
      SET cust_code=[code] WHERE doc_no='[Invoice Number]' AND status = 7

Testing

The Sales Quote document that was failing to open should now open without errors.

Back to top

Comments

0 comments

Please sign in to leave a comment.