Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8007983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T18:00:04+00:00 2026-06-04T18:00:04+00:00

I am trying to create an update WINFORM, the back story is the form

  • 0

I am trying to create an update WINFORM, the back story is the form will get info from a dataGridView when the user double clicks on the specific GUID.

My issue is that when the user inputs information and clicks the submit button I am getting the error:

There was an error parsing the query. [Token line number = 1, Token
line offset = 66, Token in error = Desc].

This may be a simple error that I am just over looking but any help is appreciated. The code for the button click is:

private void sbmtChng_Click(object sender, EventArgs e)
{
        string conString = Properties.Settings.Default.CurricularChangeTrackerConnectionString;

        using (SqlCeConnection conn = new SqlCeConnection(conString))
        {
            try
            {
                conn.Open();

                string cmdString = "UPDATE Changes SET "
                     + "ProgramCode=@ProgramCode,CourseNum=@CourseNum,Desc=@Desc,ScreenCom=@ScreenCom,PECAprv=@PECAprv,SenAprv=@SenAprv,EffDte=@EffDte,APG=@APG,Analysis=@Analysis,Matrix=@Matrix,DESE=@DESE"
                     + " WHERE Code_ID=@Code_ID";

                using (SqlCeCommand cmd = new SqlCeCommand(cmdString, conn))
                {
                    cmd.Parameters.AddWithValue("@Code_ID", SqlDbType.UniqueIdentifier).Value = Code_ID;
                    cmd.Parameters.AddWithValue("@ProgramCode", SqlDbType.NVarChar).Value = PrgmCode;
                    cmd.Parameters.AddWithValue("@CourseNum", SqlDbType.NVarChar).Value = CrseLbl.Text;
                    cmd.Parameters.AddWithValue("@Desc", SqlDbType.NVarChar).Value = ChngDes.Text;
                    cmd.Parameters.AddWithValue("@ScreenCom", SqlDbType.NVarChar).Value = scrnCmtDte.Text;
                    cmd.Parameters.AddWithValue("@PECAprv", SqlDbType.NVarChar).Value = pecAprDte.Text;
                    cmd.Parameters.AddWithValue("@SenAprv", SqlDbType.NVarChar).Value = senAprvDateTimePicker.Text;
                    cmd.Parameters.AddWithValue("@EffDte", SqlDbType.NVarChar).Value = effDte.Text;
                    cmd.Parameters.AddWithValue("@APG", SqlDbType.NChar).Value = checkBox5.Text;
                    cmd.Parameters.AddWithValue("@Analysis", SqlDbType.NChar).Value = checkBox6.Text;
                    cmd.Parameters.AddWithValue("@Matrix", SqlDbType.NChar).Value = checkBox7.Text;
                    cmd.Parameters.AddWithValue("@DESE", SqlDbType.NChar).Value = checkBox8.Text;
                    cmd.ExecuteNonQuery();
                    conn.Close();

                    /*this.Controls.Clear();
                    this.InitializeComponent();
                    this.Close();
                    */
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T18:00:05+00:00Added an answer on June 4, 2026 at 6:00 pm

    DESC is a reserved keyword. Rename the column (preferable) or change the code to surround the column name in square brackets:

    + "ProgramCode=@ProgramCode,CourseNum=@CourseNum,[Desc]=@Desc,..."
    // ----------------------------------------------^----^                     
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to extract some info from an xml file and update/create an app
I'm trying to create an integer update form field for my cart system. On
I'm trying to create a query that will update the value of rgn_no and
I am trying to create a trigger that will update a GEOMETRY column based
I am trying to create a Trigger, that will update the History Table with
I'm trying to create a form using textarea and a submit button that will
Ok, the problem is trying to render a form from a controller to create
I'm trying to create a UILabel which will inform the user of what is
I am trying to create Update trigger which should be invoked only if the
I'm trying to a create an update statement along the following lines: TABLE car:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.