Access is converting the decimal(31,7)
column to Text(31)
because the maximum precision for an Access Decimal
column is 28. I confirmed this by importing the following SQL Server table:
CREATE TABLE [dbo].[importTest](
[seq] [int] NULL,
[textCol] [nvarchar](50) NULL,
[decimalCol] [decimal](31, 7) NULL
) ON [PRIMARY]
Workaround 1:
Create a View on the SQL Server to "downsize" the offending columns...
CREATE VIEW dbo.importTestForAccess AS
SELECT seq, textCol,
CONVERT(decimal(28,7), decimalCol) AS decimalCol
FROM dbo.importTest
...and then import the View instead of the Table.
Workaround 2:
Import the table as before, and then convert the column from Text to Decimal in Access via VBA
CurrentProject.Connection.Execute _
"ALTER TABLE dbo_importTest " & _
"ALTER COLUMN decimalCol DECIMAL(28,7)"