DataTableAdapter Related Problem

Posted on 2008-11-18
Medium Priority
Last Modified: 2013-12-17
hi guys
i have web application recently i want to add a new column in the database but i am having problem at front end of my application i have updated all the relevant procedures but it doesnt let me add a new column for updating and inserting i have attached the code below.
            VideoItemsTableAdapter da = new VideoItemsTableAdapter();
            string _name = name.Text;
            int _gameid = Convert.ToInt32(((DropDownList)gameid.Controls[0]).SelectedValue);
 // adding this following new field
           int _gameidtwo = Convert.ToInt32(((DropDownList)gameidtwo.Controls[0]).SelectedValue);
            int _storyid = Convert.ToInt32(((DropDownList)storyid.Controls[0]).SelectedValue);
            DateTime _expirydate = Convert.ToDateTime(expirydate.Text);
            byte _rating = Convert.ToByte(((DropDownList)rating.Controls[0]).SelectedValue);
            DateTime _length = Helper.FormatVideoLength(length.Text);
            string _videofilename = videofilename.Text;
            byte _cretificate = Convert.ToByte(certificate.Checked ? 1 : 0);
           // _gameidtwo
               // [GameIDtwo] @GameIDtwo
            try // trying to update old data
                int RowID = Convert.ToInt32(Request.QueryString["RowID"].ToString());
                da.Update(1, _name, _gameid, _gameidtwo,   _storyid, _expirydate, _rating, null, _length, _videofilename, _cretificate, null, null, null, null, Convert.ToInt32(Session["UserID"].ToString()), RowID, RowID);
                SavingRepeaterItems(keywordsTableControlRepeater, RowID);
            catch (Exception exNewData) // saving new data
                    da.Insert(1, _name, _gameid, _gameidtwo, _storyid, _expirydate, _rating, null, _length, _videofilename, _cretificate, null, null, null, null, Convert.ToInt32(Session["UserID"].ToString()));
                    SavingRepeaterItems(keywordsTableControlRepeater, 0);

Open in new window

Question by:mattibutt
LVL 96

Accepted Solution

Bob Learned earned 2000 total points
ID: 22991134
Are you talking about adding a column in code, or through the DataSet designer?
LVL 11

Author Comment

ID: 22996070


Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Loops Section Overview
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question