troubleshooting Question

LINQ to SQL update not working!? :|

Avatar of awilderbeast
awilderbeastFlag for United Kingdom of Great Britain and Northern Ireland asked on
.NET ProgrammingC#
14 Comments1 Solution300 ViewsLast Modified:
Hi all,

ive tried every example i could find online to try and get this update working, nothing works, the data does not update but there are no errors! :|

can anyone help me out?
as you can see i currently tried the below two methods before posting

Thanks
protected void UpdateProfile(object sender, EventArgs e)
    {
        int ID = Convert.ToInt32(pID.Value);

        ClientDataContext dc = new ClientDataContext();

        ClientCV cvData = dc.ClientCVs.Single(p => p.ID == ID);
        /*
            var GetData = (from c in dc.ClientCVs
                          where c.ID == ID
                            select c).Single();
        
            GetData.Description = txtPersonalProfile.Text;
        */
        cvData.Description = txtPersonalProfile.Text;
        try
            {
                dc.SubmitChanges();
               lblHist.Text = "Personal profile updated!";
            }
            catch (Exception ex)
            {
                lblHist.Text = "Error: " + ex.ToString();
            }
        
        
        upProfile.Update();
    }

Open in new window

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 14 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 14 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros