M
Mats Boberg
I can't get the command builder to build my update, insert, delete
commands... Any tips?
SqlCeDataAdapter adapter = null;
SqlCeCommandBuilder comBuilder = null;
try {
adapter = new SqlCeDataAdapter();
adapter.SelectCommand = new SqlCeCommand("select * from
tProducts",connection);
comBuilder = new SqlCeCommandBuilder(adapter);
connection.Open();
adapter.Update(productsDataSet);
} catch (Exception ex) {
throw ex;
} finally {
// check if connection is open
if( connection.State == ConnectionState.Open) {
// close connection
connection.Close();
}
}
commands... Any tips?
SqlCeDataAdapter adapter = null;
SqlCeCommandBuilder comBuilder = null;
try {
adapter = new SqlCeDataAdapter();
adapter.SelectCommand = new SqlCeCommand("select * from
tProducts",connection);
comBuilder = new SqlCeCommandBuilder(adapter);
connection.Open();
adapter.Update(productsDataSet);
} catch (Exception ex) {
throw ex;
} finally {
// check if connection is open
if( connection.State == ConnectionState.Open) {
// close connection
connection.Close();
}
}