views:

435

answers:

1

Helo. Firts of all i'm sorry for my eanglish. I'm writing Windows Form application in Visual Studio 2008 in C#. I created database (Baza.mdf) or rather "Service-based Database" this is only option to create .mdf in WindowsForm App. Then i create ADO.NET Entity Data Model. I Add New Data Source and Drag and Drop "BazaDataSet" to my form. I create other form with textboxes to adding new values. When i Add new record it is onlu visible in "BazaDataSet" - its adding succesfully but when i click "show table data" in Baza.mdf there's nothing changed. Please help.

There is my code: BazaEntities gg = new BazaEntities(); //var cos = (from u in jj select u); // jj.id = int.Parse(idAutaBox.Text); jj.marka = MarkaBox.Text; jj.model = ModelBox.Text; gg.AddToAutasSet(jj); gg.SaveChanges();

        MessageBox.Show("dodano");  
+3  A: 

Take a look here: http://msdn.microsoft.com/en-us/library/bb738695.aspx

And just make sure that you have are doing similar to their example.

Ardman
I deal with the problem. http://asp.dotnetheaven.com/howto/doc/adoplus/UpdateDataFromDB.aspxsolution 1http://www.c-sharpcorner.com/UploadFile/Ashish1/dataset02052006180740PM/dataset.aspxsolution2 - very similarand its couple of similar wep pages, ask uncle google (dataset do database) or (update database from dataset)