A
A.Ramezan
Hi everybody,
I cannot create a new record in my DB what is problem ?
oleDbConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\Temp\\AlphaControlDB.MDB");
oleDbConnection.Open();
OleDbDataAdapter DA = new OleDbDataAdapter() ;
DA.SelectCommand = new OleDbCommand( "SELECT * FROM Days", oleDbConnection);
OleDbCommandBuilder custCB = new OleDbCommandBuilder(DA);
DataSet DS = new DataSet();
DA.Fill( DS, "DAYS" );
DataRow Row = DS.Tables["Days"].NewRow();
Row["Description"] = "Alvarez";
DS.Tables["Days"].Rows.Add( Row );
//Row.AcceptChanges();
//myTable.AcceptChanges();
DS.AcceptChanges();
DA.Update( DS, "DAYS");
oleDbConnection.Close();
any combination on accept changes do not effect.
I cannot create a new record in my DB what is problem ?
oleDbConnection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\\Temp\\AlphaControlDB.MDB");
oleDbConnection.Open();
OleDbDataAdapter DA = new OleDbDataAdapter() ;
DA.SelectCommand = new OleDbCommand( "SELECT * FROM Days", oleDbConnection);
OleDbCommandBuilder custCB = new OleDbCommandBuilder(DA);
DataSet DS = new DataSet();
DA.Fill( DS, "DAYS" );
DataRow Row = DS.Tables["Days"].NewRow();
Row["Description"] = "Alvarez";
DS.Tables["Days"].Rows.Add( Row );
//Row.AcceptChanges();
//myTable.AcceptChanges();
DS.AcceptChanges();
DA.Update( DS, "DAYS");
oleDbConnection.Close();
any combination on accept changes do not effect.