//insert data private void button1_Click(object sender, EventArgs e) { DataClasses1DataContext dv = new DataClasses1DataContext { }; DVD d = new DVD { }; d.Title = txtTitle.Text; d.ID = txtId.Text; d.Certificate = Convert.ToInt32( txtCert.Text); d.Price = Convert.ToDecimal(txtPrice.Text); dv.DVDs.Insertonsubmit(d); dv.DVDs.Context.SubmitChanges(); }
after reading around i have found that there have been some cases of the data submitting to a cache somewhere (i really dont know where the hell its being stored) rather than to the database.
i have also tried changing the submit commands from
dv.DVDs.Context.SubmitChanges();
to
dv.SubmitChanges();
to no avail i'm completely stumped
forgot to mention this is on a windows form application, i have tried the same thing on an ASP.net website and it works beautifully
in my view all the data is pulled out and is viewable (even after the program has been reset) the data is still there however when i view the table data the record has not been created or submitted .