[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
SSMS Error inserting data into table Error 4815

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

SSMS Error inserting data into table Error 4815.


Applies to: SQL Server Management Studio (SSMS).

Date created: December 25, 2022.
 

Problem Description.
 

While trying to import a CSV file to a SQL Server database using Import Flat File Wizard of SQL Server Management Studio (SSMS), a user got the following error message:

 

Error inserting data into table. (Microsoft.SqlServer.Import.Wizard)
Additional information:
Error inserting data into table. (Microsoft.SqlServer.Prose.Import.SDS)
Received an invalid column length from the bcp client for colid 5. (Microsoft SQL Server,Error: 4815)


 

Cause.


Most likely the issue will be the data in one of the columns in the CSV is too large to fit into the destination column in database.

 

Workaround/Solution.


Use bigger data types on the destination table.  For example, in the Modify Columns section change all varchar columns to NVARCHAR(MAX). Similarly, the bigint data type is intended for use when integer values might exceed the range that is supported by the int data type.

 

 

 

.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.