ExecuteNonQuery: Connection property has not been initialized.
da.SelectCommand = new SqlCommand("Select * from #InsertQueues", vid);
And no need to open and close the connection.
SqlDataAdapter
does this internally. Also,
ExecuteNonQuery
is not required here, everything is handled by
Fill
method.