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

Could not find prepared statement with handle due to too new SQL driver

Last updated on 29 May 2024

Admin

Overview

During regular operations you may see errors similar to the following (full example error stacks are available at the end of the article):

  • Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000)
    • The number "113" is an example, it can be any other number.
  • Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000)
  • Procedure or function has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000)

This may happen randomly (e.g., during background operations), or during other explicit actions - such as importing replication packages or even browsing views and modifying objects.

Solution

Ensure that the Microsoft OLE DB Driver for SQL Server that the OS has installed is not too new for the M-Files Server version you have.

For M-Files server versions older than 24.4 (April 2024), the MS SQL driver must be lower than version 18.6.

If you have a Microsoft OLE DB Driver for SQL Server version 18.6 or newer installed, you need an M-Files Server version 24.4 (April 2024) or newer.

If you have a newer driver version than M-Files Server supports, you have two options:

  • Upgrade M-Files Server.
  • OR, uninstall it and install the one that M-Files Server carries in its installation folder (e.g., server\msoledbsql_v18.msi).

Example error stacks

Example 1

BackgroundOperationScheduler.cpp, 890, Registering the background operation "mfserver_asynctasks" failed. (0x80040120)

VaultOperationsMngr.cpp, 686, Registering the background operation "mfserver_asynctasks" failed. (0x80040120)

BackgroundOperationScheduler.cpp, 358, Registering the background operation "mfserver_asynctasks" failed. (0x80040120)

BackgroundOperationScheduler.cpp, 343, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

MCallInLoop.h, 530, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

BackgroundOperationScheduler.cpp, 499, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

BackgroundOperationScheduler.cpp, 665, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

CachedDBSession.cpp, 1201, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 584, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 843, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 801, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 583, Could not find prepared statement with handle 113. (ERROR: 8179, SQLSTATE: 42000) (0x80040E14)

(M-Files 24.2.13421.8 2024-05-13T02:57:23.470Z)

Example 2

System.Runtime.InteropServices.COMException (0x80040001): Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000)

CoVaultApplicationTaskOperations.cpp, 638, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

ServerVaultApplicationTaskOperationsHelper.cpp, 364, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

CoRPCOverCOM.cpp, 1573, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

RPCApplicationTaskQueue.cpp, 463, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

MCallInLoop.h, 521, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

RPCApplicationTaskQueueHelper.cpp, 1186, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

RPCApplicationTaskQueueHelper.cpp, 1217, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

RPCApplicationTaskQueueHelper.cpp, 1925, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

CachedDBSession.cpp, 1201, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 584, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 843, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 801, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 583, Procedure or function  has too many arguments specified. (ERROR: 8144, SQLSTATE: 42000) (0x80040E14)

(M-Files 23.8.12892.6 2023-09-25T17:26:46.203Z)

Example 3

DocListView_Notifications.cpp, 4477, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

DocListView.cpp, 507, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

DocListView_Notifications.cpp, 81, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

DocListView.cpp, 12570, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

FolderObjectsEnum.cpp, 82, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

FolderObjectsEnum.cpp, 60, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

CoShellFolder.cpp, 4318, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

VaultSearchOperations.cpp, 61, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

VaultSearchOperations.cpp, 152, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ThreadOutCaller.cpp, 67, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ThreadOutCaller.cpp, 581, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

VaultMethodCallTasks.cpp, 194, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

CoVaultMountingSearch.cpp, 188, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

VaultStateSearch.cpp, 207, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCache.cpp, 481, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCache.cpp, 1583, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCache.cpp, 1894, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCacheNode.cpp, 1021, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCacheNode.cpp, 1293, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCacheNode.cpp, 10749, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCacheNode.cpp, 5496, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

ListingCacheNode.cpp, 14532, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

IRPCSearch.generated.cpp, 1330, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

gRPCClient.cpp, 496, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

gRPCClient.cpp, 465, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

gRPCClient.cpp, 98, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

gRPC.generated.cpp, 23789, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearch.cpp, 546, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MCallInLoop.h, 521, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearchHelper.cpp, 2909, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearchHelper.cpp, 4117, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearchHelper.cpp, 4176, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearchHelper.cpp, 7917, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCSearchHelper.cpp, 6569, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCViewsHelper.cpp, 1679, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCViewsHelper.cpp, 1707, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCViewsHelper.cpp, 2169, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

RPCViewsHelper.cpp, 5553, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MetadataStructureCacheHelper.cpp, 29, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MetadataStructureCache.cpp, 95, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

Vault.cpp, 3132, Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

SQLHelperTemplates.cpp, 1245, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

CachedDBSession.cpp, 1201, Procedure  has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 584, Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 843, Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 801, Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

MCommand.h, 583, Procedure has no parameters and arguments were supplied. (ERROR: 8146, SQLSTATE: 42000) (0x80040E14)

(M-Files 23.9.12966.6 2023-09-28T18:06:18.891Z)

Still need help?