Home
About
Search
Welcome to M-Files Empower – our new support experience. We'd love to hear what you think!Give feedback
Home/Support and troubleshooting/Troubleshooting/Error resolution

External object refresh fails with "Invalid column name" after external database modifications

Last updated on 22 December 2022 · 2 min read

Admin
Connections to External Databases (Integrated)

Overview

When using external object types with a connection to external database, you see an "Invalid column name " error when running a refresh for the object type. The error started to show after there was changes done to the external database, for example updating or removing the table columns.

…

ExternalDSHelper.h, xx, Statement(s) could not be prepared. (ERROR: 8180, SQLSTATE: 42000)(0x80040E14)
MCommand.h, xx, Statement(s) could not be prepared. (ERROR: 8180, SQLSTATE: 42000) (0x80040E14)
MCommand.h, xx, Invalid column name 'Column Name'. (ERROR: 207, SQLSTATE: 42S22) (0x89790002)

Solution

This error can be expected if there are changes in the external database, but these changes have not been included to the SELECT statements used in M-Files Admin tool.

The first thing to check is the SELECT statement under the object type:

  1. Open M-Files Admin tool and select the related Vault
  2. Select Metadata structure and Object types
  3. Select the object type and Connection to External Database tab
  4. Open the relevant connection and check that the SELECT statement uses correct columns 

Also, remember to check the SELECT statements used in Advanced Vault Settings:

  1. Open M-Files Admin tool and select the related Vault
  2. Select Configurations and Advanced Vault Settings

Refresh Time filtering:

  • Expand the Connections to External database and Object Types 
  • Select the relevant Object type and Refresh Time filtering
  • Check that the SELECT statement uses correct columns

Quick Refresh:

  • Expand the Connections to External database and Quick refresh
  • Select the relevant Object type
  • Check that the SELECT statement uses correct columns

Still need help?

On this page