Hello, everybody.
I have typed DataSet ( dsMain ), that contains table ( ReferenceCycle ). In the program I make changes in that table, using generated by VS typed table adapter ( taReferenceCycle ) and values seems to gets inserted. And when I'm trying to update database with this - nothing happens. Here's part of my code:

taReferenceCycle.InsertQuerry(newCycle);
taReferenceCycle.Update(dsMain.ReferenceCycle);
dsMain.ReferenceCycle.AcceptChanges();

What am I doing wrong?
Any help would be greatly appreciated :)

What's newCycle datatype?
Look I tried that

BlogEngineDataSetTableAdapters.StudentTableAdapter s =
new rying.BlogEngineDataSetTableAdapters.StudentTableAdapter();
BlogEngineDataSet dsMain = new BlogEngineDataSet();
s.Insert(1000, "d", "a", "a", DateTime.Now);
//s.Update(dsMain.Student);
//dsMain.AcceptChanges();

Hello, Ramy.
Thanks for helping me :) newCycle has string type. The InsertQuerry I've created by adding queries in Wizard. My table ReferenceCycle consists from 2 fields (cycleId - It counts automatically; name - string, that I pass as argument into InsertQuerry method).

Also, my DataSet is changing perfectly. The only thing - is that I can't pass changes, that I've made, to database :(

It's also works with my defined insert query

BlogEngineDataSetTableAdapters.StudentTableAdapter tblStudent =
new trying.BlogEngineDataSetTableAdapters.StudentTableAdapter();
//BlogEngineDataSet dsMain = new BlogEngineDataSet();
tblStudent.InsertQuery(11, "d", "a", "a", DateTime.Now);

Try to take a variable from your table adapter then use its InsertQuery.
-Check TableAdapter properties that InsertCommand is not none.

InsertCommand value is "INSERT INTO [ReferenceCycle] ([name]) VALUES (@p1)". DataSet is also generated by VS (if you're talking about that).

Don't know really!!! I don't do any custom code, it generates, I'm calling, everything is OK! if you don't have SQL SP2, and don't use Express edition of SQL Server, try to run your application as administrator...

I solved this. I moved my database (with dataset, adapters) into new (non-startup) project in the same solution and it's working now :) Unfortunately I have no explanation of that O.o

This question has already been answered. Start a new discussion instead.