I had a same problem and that i did was to create a string with the names of the datatable and then adding them to my command builder.
private string GetColumnNames(DataTable dt)
{
string name = String.Empty;
foreach (DataColumn dc in dt.Columns)
{
name += dc.ColumnName + " NVARCHAR(50)"+", ";
}
return name;
}
private void CreateTableFromDataTable(DataTable dt,string tablename,string columns)
{
string createString = "CREATE TABLE "+tablename+" ("+ columns+")";
SqlCommand create = new SqlCommand(createString, sqlconnection);
sqlconnection.Open();
create.ExecuteNonQuery();
sqlconnection.Close();
}