I got a database with same elements as the xmlfile, i have tried differents "dbtypes" as int, float nvarchar etc.
its only downloads the first two elements: produktid and produktnamn, error is The given ColumnName 'omgang' does not match up with any column in data source.
Why is that?
what do i have to do to make it work?
i have tried without "SqlBulkCopyColumnMapping"
also without any mappings at all but it shows the same error
Now i dont have all columns in database as shown in xmlfile and what i understand, its not needed, it reads what i got in DB. (My english sucks, so pls ask if you dont understand)
here is the xmlfile:
and the code:
private void button1_Click(object sender, EventArgs e)
string connectionString = "Data Source=AK\\SQLEXPRESS;Initial Catalog=Tipset;Integrated Security=True";
DataSet ds = new DataSet();
DataTable sourcedata = new DataTable();
sourcedata = ds.Tables;
using (SqlConnection sqlconn = new SqlConnection(connectionString))
using (SqlBulkCopy bulkCopy = new SqlBulkCopy(sqlconn))
SqlBulkCopyColumnMapping columnmproduktid = new
View Complete Post