title: sqlbulkcopy: Data truncated
body: <p>When i inserted data from csv; description column data truncated with length 255.</p>
  
  <p>datatype for description varchar(max), nvarchar(max), text, etc tried.</p>
  
  <p>my code</p>
  
  <pre><code>string CsvConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +filelocation +"; Extended Properties=\"text;HDR=Yes;FMT=Delimited\"";             
  using (OleDbConnection connection = new OleDbConnection(excelConnectionString))
  {
      OleDbCommand command = new OleDbCommand("Select * FROM ["+filename+"]", connection);
      connection.Open();               
      using (DbDataReader dr = command.ExecuteReader())
      using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlConnectionString))
      {                       
          bulkCopy.ColumnMappings.Add(new SqlBulkCopyColumnMapping("description", "description")); 
          bulkCopy.DestinationTableName = "Table1";               
          bulkCopy.WriteToServer(dr);                        
      }       
  }
  </code></pre>
  
  <p>VS2010, C#
  SQL2008 R2 10.50 Express</p>
  
  <p>Please suggest if there are another methods for inserting data from CSV to SQL Server</p>