DataTableAdapter Related Problem

Posted on 2008-11-18
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

    Are you talking about adding a column in code, or through the DataSet designer?
    LVL 11

    Author Comment



    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
    In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now