protected void UpdateContact(int contactID)
{
siteSetupDataContext2 = new SiteSetupDataContext();
try
{
var contacts = from c in siteSetupDataContext2.CONTACTs
where c.CONTACTID == contactID
select c;
CONTACT cont = contacts.Single();
siteSetupDataContext3 = new SiteSetupDataContext();
siteSetupDataContext3.CONTACTs.Attach(cont,contacts.Single());
cont.COMMENTS = "from LINQ";
siteSetupDataContext3.SubmitChanges();
}
catch (Exception ex)
{
throw ex;
}
}
The above code throws no exception but it doesn't update the database. I am using oracle 9i.
It is also using the DataContext class generated by Entity Developer. I am able to retrieve data but not update!
Any ideas?