TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
asdf asdf
NA
7
0
Doesn't update my database
Nov 28 2009 1:20 AM
Hi everyone, the code below still doesn't update my database //Fill a dataset with values CSOAIS.BACKEND.DATASETS.ItemDatasetTableAdapters.ItemTableAdapter ItemAdapter; ItemAdapter = new CSOAIS.BACKEND.DATASETS.ItemDatasetTableAdapters.ItemTableAdapter(); CSOAIS.BACKEND.DATASETS.ItemDataset ItemDS = new CSOAIS.BACKEND.DATASETS.ItemDataset(); ItemDS.DataSetName = "ItemDataset"; ItemDS.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; ItemAdapter.Fill(ItemDS.Item); //Auto generate item code txtIcode.Text = this.GenerateCode(ItemDS.Item, "ITM-"); // Create a new row. CSOAIS.BACKEND.DATASETS.ItemDataset.ItemRow NewItemRow; NewItemRow = ItemDS.Item.NewItemRow(); NewItemRow.ItemCode = this.GenerateCode(ItemDS.Item, "ITM-"); NewItemRow.ItemName = this.txtIname.Text; NewItemRow.ItemDesc = this.txtIdesc.Text; NewItemRow.CategoryCode = (string)this.cmboCategory.Text; NewItemRow.SubCategoryCode = (string)this.cmboSubCat.Text; NewItemRow.UnitMeasureCode = (string)this.cmboUM.Text; //set default values NewItemRow.LocationCode = "CSO"; NewItemRow.StatusCode = "Active"; // Add the row to the Item table ItemDS.Item.Rows.Add(NewItemRow); // Save the new row to the database this.itemTableAdapter.Update(ItemDS.Item); this.itemTableAdapter.Connection.Close();
Reply
Answers (
6
)
Having doubts over windows service
website