Blog Home  Home Feed your aggregator (RSS 2.0)  
Software Code Help blogs - Problem: TableAdapter generated by visual studio designer, not saving data in database
newtelligence powered
 
 Thursday, November 13, 2008

Hi.

I have created a Typed Data Set using visual studio 2005 designer. I drag-dropped a table from database and it created a typed data table into it. When I insert data into this table using TableAdapter generated by Visual sudio designer it does not insert in physical database.

I can retrieve it till application is running and lost as the inserted data is in memory not in physical database.

here is the sample code I wrote:

DefectTrackerDataSetTableAdapters.tblDefectsTableAdapter ta = new DefectTracker.DefectTrackerDataSetTableAdapters.tblDefectsTableAdapter();

ta.InsertDefect(Convert.ToInt32(txtDefectNo.Text), "MQC", dpAssignDate.Value, "Open");

 

Thursday, November 13, 2008 4:55:41 AM (GMT Standard Time, UTC+00:00)  #    Comments [1]    | 
Copyright © 2009 Software Code Help. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.
Pick a theme: