G
Guest
Hi,
I am using a SqlCommandBuilder to update a Db table via an updated DataSet
and SqlAdapter and it doesn't seem to be generating the activity commands
from the Select command. Here is a snippet.
sda = new SqlDataAdapter();
sda.SelectCommand = new SqlCommand(sql,dbcon);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
DataSet ds = new DataSet();
sda.Fill(ds,pageName);
DataRow dr = ds.Tables[pageName].NewRow();
for(int x=0;x<14;x++)
{
dr[x] = newDataRow[x];
}
ds.Tables[pageName].Rows.Add(dr);
ds.AcceptChanges();
sda.Update(ds,pageName);
Nothing happens, no update and no exceptions. Any ideas please?
Jim
I am using a SqlCommandBuilder to update a Db table via an updated DataSet
and SqlAdapter and it doesn't seem to be generating the activity commands
from the Select command. Here is a snippet.
sda = new SqlDataAdapter();
sda.SelectCommand = new SqlCommand(sql,dbcon);
SqlCommandBuilder scb = new SqlCommandBuilder(sda);
DataSet ds = new DataSet();
sda.Fill(ds,pageName);
DataRow dr = ds.Tables[pageName].NewRow();
for(int x=0;x<14;x++)
{
dr[x] = newDataRow[x];
}
ds.Tables[pageName].Rows.Add(dr);
ds.AcceptChanges();
sda.Update(ds,pageName);
Nothing happens, no update and no exceptions. Any ideas please?
Jim