System.InvalidCastException Unable to case object of type ‘System.DBNull’ to type ‘System.string’

System.InvalidCastException Unable to case object of type ‘System.DBNull’ to type ‘System.string’

PROBLEM

  • When trying to print a message to a Selection Rule, on the Contact Groups screen of the Send Message window when you click on the "Next" button you get the Error Message: System.InvalidCastException: Unable to cast object of type 'System.DBNull' to type 'System.String'. 

CAUSE

The first CG record in the Selection Rule is essentially blank, missing the CG Name, Individuals information, and a mailing address. 

SOLUTION

Since the CG record is blank and doesn’t contain anything, you can go ahead and delete the record from Gorilla using the instructions in the article How to Downline/Delete a Contact Group.

Once it is no longer in the selection rule, try sending the message again.


    • Related Articles

    • Unable to Send Email Message

      PROBLEM When trying to send an email message from Gorilla, you get the message:  Unable to send email message: Retrieving the COM class factory for component with CLSID {741BEEFD-AEC0-4AFF-84AF-4F61D15F5526} failed due to the following error: ...
    • System.ArgumentException Parameter is not valid

      PROBLEM In Gorilla when going to open either the Document Manager, Message Queue, Scratchpad, or other new forms within Gorilla the user would get the error: System.ArgumentException: Parameter is not valid. at System.Drawing.Font.GetHeight(Graphics ...
    • Gorilla® CRM System Requirements

      PREFACE This document is to be used as a guideline for purchasing computer equipment. All items listed are recommended requirements for use with the System (unless the opposite is stated). This document is updated regularly to reflect changes to ...
    • Unexpected Invalid System Owner Checksum

      PROBLEM When Opening Gorilla you get an “Unexpected invalid system owner checksum”, or similar message. CAUSE This error generally occurs when something corrupts a part of the database. IE: A failed Campaign import, or an interrupted upgrade. ...
    • Type Mismatch Error during Import

      PROBLEM When importing a list or a Campaign, you get a “Type Mismatch” error. CAUSE This is usually caused by importing the wrong file type or trying to import a zipped file. SOLUTION Campaigns If the Campaign downloaded came in a compressed (zipped) ...