sql-serverms-access-2003longtextaccess-database-engine

Error inserting in Microsoft Access 2002-2003 "long Text" field SQL Server 2019 linked Server Microsoft Access Database Engine 2010 x64


I am attempting to migrate a number of stored procedures, which insert to Microsoft Access 2002-2003 format database files, as linked servers.

The process is currently working fine on the following configuration

Windows Server 2008 R2 Standard
SQL Server 2014
Microsoft Access Database Engine 2010 x64 - v14.0.7015.1000

The updated configuration is as follows

Windows Server 2019 Datacenter
SQL Server 2019
Microsoft Access Database Engine 2010 x64 - v14.0.7015.1000

The Microsoft.ACE.OLEDB.12.0 has registered fine on the newer server configuration, and is available as a linked server "provider"

The SP inserts to a number of tables, with varying data types, and all are successful, with the exception of fields where the SQL Server field is of type nvarchar and the Access mdb field is of type "Long Text", where I get the error.

Msg 7344, Level 16, State 1, Line 182
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "[Access mdb Linked Server Name]" could not INSERT INTO table "[Access mdb as Linked Server]...[Table Name]" because of column "[Column Name]". The column had a bad status.

The Long text fields in the Access mdb are reported/displayed as varchar data type, in the linked server configuration.

I have tried writing simple, short, strings to the field, CASTing as varchar data type, but still get the same error.

I've done lots of googling, but can find no examples of others experiencing similar issues.

I suspect it is a compatibility issue, between the SQL server version and access database engine but, again, have been unable to find any useful resource.

Has anyone experienced a similar issue, and found a resolution?

Or if you can direct me to a suitable resource where I can find more info.


Solution

  • I managed to resolve this, with changes to the configuration of the OLEDB provider on the SQL server.

    It was necessary to enable both: Dynamic Parameter and Allow inprocess

    in the provider Options

    Microsoft.ACE.OLEDB.12.0 Configuration options

    MS Access mdb Linked Server configuration