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 9191261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:38:33+00:00 2026-06-17T20:38:33+00:00

after recently compiling and attempting to test a basic forum assembly, I ran into

  • 0

after recently compiling and attempting to test a basic forum assembly, I ran into a surprising MySQL error:

Forum.ForumException: MySql.Data.MySqlClient.MySqlException (0x80004005): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc) VALUES('bar', 'bar')' at line 1 at ...

Here is the CreateBoard function from the Forum assembly:

        public int CreateBoard(string bname, string bdesc)
        {
            MySqlConnection con = new MySqlConnection(conString);
            MySqlCommand cmd = new MySqlCommand("INSERT INTO boards (name, desc) VALUES(?name, ?desc)", con);
            int res_id = 0;

            try
            {
                //cmd.CommandText = "INSERT INTO boards(name, desc) VALUES(?name, ?desc)";
                cmd.Parameters.Add("?name", MySqlDbType.VarChar).Value = bname;
                cmd.Parameters.Add("?desc", MySqlDbType.VarChar).Value = bdesc;
                con.Open();
                cmd.ExecuteNonQuery();
                //get the id of the new board
                //cmd.CommandText = "SELECT last_insert_id() FROM boards";
                //res_id = (int)cmd.ExecuteScalar();
                return res_id;
            }
            catch (Exception yf)
            {
                throw new ForumException(yf.ToString());
            }
            finally
            {
                con.Close();
            }
        }

And finally, here is the code snippet from the test page ‘a.aspx’

protected void Page_Load(object sender, EventArgs e)
{
    Forum f = new Forum();
    try
    {
        int b = f.CreateBoard("foo", "bar");
        if (b == 0)
        {
            Response.Write("Board creation failure :(");
            return;
        }
        Response.Write("Board create with id '" + b + "', name 'foo', and description 'bar'");
    }
    catch (ForumException ff)
    {
        Response.Write(ff.ToString());
    }
}

It appears that a random quote comes out of nowhere when the query is executed. Can anyone please help me with this? I’ts been frustrating to solve.

  • 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-17T20:38:34+00:00Added an answer on June 17, 2026 at 8:38 pm

    i think desc is a reserved keyword, descending in order by clause.

    do `desc` instead

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently got MySQL compiled and working on Cygwin, and got a simple test
We recently had a bug, after a fellow developer changed a RegExp literal into
Have recently rebuild Apache after which G Data API stopped working, here is the
This error recently cropped after I installed Firefox 4. I am using asynchronous loading
I recently noticed my test database is not being cleaned up after my tests
After recently discovering how insanely long the .net 3.5 framework was to install I
After using the ebay API recently, I was expecting it to be as simple
I've recently returned to C/C++ after years of C#. During those years I've found
I recently lost access to my Seagate eSATA HD after my Mac froze up
I recently started reading about ASP.net MVC and after getting excited about the concept,

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.