goneWildCoder
Programmer
Hi all,
I am getting the following error when trying to update database table:
"Error: Update unable to find TableMapping['Table'] or DataTable 'Table'.
Here is the code snippet that is throwing the error (specifically, the Update() command )
if (upDateFlag)
{
//update
SqlConnection dataConnection = new SqlConnection("Integrated Security=true;" +
"Initial Catalog=SPIRIT2TEST;" + "DataSource=TECHSERVER") ;
SqlDataAdapter adap = new SqlDataAdapter("SELECT * FROM Dept", dataConnection);
adap.Update(changedDataDs, "Dept");
ds.AcceptChanges();
}
catch (Exception e)
{}
Can you please point out what I might be doing wrong...
Thanks
I am getting the following error when trying to update database table:
"Error: Update unable to find TableMapping['Table'] or DataTable 'Table'.
Here is the code snippet that is throwing the error (specifically, the Update() command )
if (upDateFlag)
{
//update
SqlConnection dataConnection = new SqlConnection("Integrated Security=true;" +
"Initial Catalog=SPIRIT2TEST;" + "DataSource=TECHSERVER") ;
SqlDataAdapter adap = new SqlDataAdapter("SELECT * FROM Dept", dataConnection);
adap.Update(changedDataDs, "Dept");
ds.AcceptChanges();
}
catch (Exception e)
{}
Can you please point out what I might be doing wrong...
Thanks