M
Matt
I have a C# app where I create an empty datatable using the fillschema
method off of the SQLDataAdapter. I populate the datatable from a
parsed Excel spreadsheet and then need to update it. I have a small
routine where I hand in the datatable and the connection string:
string cmd = select * from RecordType1";
SqlDataAdapter sda = new SqlDataAdapter(cmd, conn);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
sda.InsertCommand = scb.GetInsertCommand();
sda.Update(dt);
sda.Dispose();
There is a single row in the datatable - and I get no errors, but the
database does not update. I am sure I am missing something simple
here - but I cannot figure out what it is.
Thanks,
Matt
method off of the SQLDataAdapter. I populate the datatable from a
parsed Excel spreadsheet and then need to update it. I have a small
routine where I hand in the datatable and the connection string:
string cmd = select * from RecordType1";
SqlDataAdapter sda = new SqlDataAdapter(cmd, conn);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
sda.InsertCommand = scb.GetInsertCommand();
sda.Update(dt);
sda.Dispose();
There is a single row in the datatable - and I get no errors, but the
database does not update. I am sure I am missing something simple
here - but I cannot figure out what it is.
Thanks,
Matt