After reading through within an stand out-sheet (to transferTable), I wish to include that data to a different table (destinationTable) using SqlBulkCopy, but I am obtaining the error:

"Cannot access destination table 'test'"

I have attempted while using default tablename and taking advantage of square brackets, but that did not work.

Any suggestions?

        /**
     * LOADS EXCEL DATA TO DATATABLE
     **/
    private void writeToDBButton_Click(object sender, EventArgs e)
    {

        MakeTable();
        destinationTable.TableName = "test";
        testDBDataSet.Tables.Add("test");


        // Connects to the sql-server using Connection.cs
        SqlConnection connection = Connection.GetConnection();

        using (connection)
        {
            connection.Open();

            // Uses SqlBulkCopy to copy the data from our transferTable to the destinationTable
            using (SqlBulkCopy bulkCopy = new SqlBulkCopy(connection))
            {

                bulkCopy.DestinationTableName = destinationTable.TableName;

                try
                {
                    // Write from the source to the destination.
                    bulkCopy.WriteToServer(transferTable);
                    this.dataGridView2.DataSource = destinationTable;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }

                connection.Close();
            }
        }
    }

    private void saveDBButton_Click(object sender, EventArgs e)
    {
        this.Validate();
        this.usersBindingSource.EndEdit();
        this.tableAdapterManager.UpdateAll(this.testDBDataSet);
    }


    private void MakeTable()
    {

        // Adds the correct amount of rows to our destinationTable
        for (int counter = 0; counter < columns; counter++)
        {
            DataColumn dummy = new DataColumn();
            dummy.DataType = System.Type.GetType("System.Double");
            destinationTable.Columns.Add(dummy);
        }

    }

It appears the user who executes this code do not have proper accessibility database. * Check to ensure that the consumer got access. * Look into the connectionstring your using for connecting towards the database.