N
nannu
m using this code :...........................
=======================================================================
OleDbConnection con =new OleDbConnection
(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and
Settings\ic411242\My Documents\db2.mdb");
con.Open ();
OleDbDataAdapter adp =new OleDbDataAdapter();
adp.SelectCommand = new OleDbCommand ( "select * from t1",con);
OleDbCommandBuilder cbd =new OleDbCommandBuilder (adp);
DataSet ds =new DataSet ();
adp.Fill (ds,"t1");
ds.Tables["t1"].Rows[0]["name"]="crystal";
adp.Update(ds,"t1");
con.Close ();
=======================================================================
PROBLEM :: RUNTIME ERROR --- Dynamic SQL generation for the
UpdateCommand is not supported against a SelectCommand that does not
return any key column information.
t1 = TABLE IN MY DOCUMENTS
=======================================================================
OleDbConnection con =new OleDbConnection
(@"Provider=Microsoft.Jet.OLEDB.4.0; Data Source = C:\Documents and
Settings\ic411242\My Documents\db2.mdb");
con.Open ();
OleDbDataAdapter adp =new OleDbDataAdapter();
adp.SelectCommand = new OleDbCommand ( "select * from t1",con);
OleDbCommandBuilder cbd =new OleDbCommandBuilder (adp);
DataSet ds =new DataSet ();
adp.Fill (ds,"t1");
ds.Tables["t1"].Rows[0]["name"]="crystal";
adp.Update(ds,"t1");
con.Close ();
=======================================================================
PROBLEM :: RUNTIME ERROR --- Dynamic SQL generation for the
UpdateCommand is not supported against a SelectCommand that does not
return any key column information.
t1 = TABLE IN MY DOCUMENTS