Deep_p_patel

I have created all the required component for data access in windows form (from the walkthrough).

I am able to fetch the data from database table (access database). but after changing the data when I press save button it does not reflect data to my database here is the code I have used in save button click.

private void studentBindingNavigatorSaveItem_Click(object sender, EventArgs e)

{

this.Validate();

this.studentBindingSource.EndEdit();

this.studentTableAdapter.Update(this.studentDataSet.Student);

}




Re: Visual C# General Database Upadate Problem

mr_super_genius

have u set the DataAdapter's update command property

you need to have this property set before updating





Re: Visual C# General Database Upadate Problem

mr_super_genius

you can find more about update command over here:

http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.updatecommand.aspx

another technique is to use the command builer class which automatically generates the commands for u, have a look at this:

http://msdn2.microsoft.com/en-us/library/system.data.sqlclient.sqlcommandbuilder.aspx





Re: Visual C# General Database Upadate Problem

Deep_p_patel

for the update query of adpter is called at the end.

look at my code i have done.

now tell me other step to go forward.

thank you for this reply.

bye.

------------------- deep patel






Re: Visual C# General Database Upadate Problem

Deep_p_patel

I have done this using Dataset designer.

and update query is working fine. but problem is that the changes i have made is not reflected is dataset i have checked this in debug mode.