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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:21:10+00:00 2026-05-23T02:21:10+00:00

I have a problem with inserting into a MSSQL CE database, locCon.Open(); SqlCeCommand locCmd

  • 0

I have a problem with inserting into a MSSQL CE database,

locCon.Open();

SqlCeCommand locCmd = locCon.CreateCommand();
locCmd.CommandText = "INSERT INTO user (ID,FName,LName,Email) VALUES('"+this.id+"','"+this.fName+"', '"+this.lName+"','"+this.email+"')";
locCmd.ExecuteNonQuery();

When running this I get

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

Now i cant see anything wrong with the query although this is the firsr time ive used MS SQL of examples ive seen the syntax for mysql and msssql are identical well for inserts anyway. Is there soemthing obviously wrong with this?

Thanks

  • 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-05-23T02:21:11+00:00Added an answer on May 23, 2026 at 2:21 am

    I think “user” is a reserved word in the database. Try replacing this:

    INSERT INTO user (ID,FName,LName,Email) VALUES (
    

    with this:

    INSERT INTO [user] (ID,FName,LName,Email) VALUES (
    

    (I think it’ square brackets for MSSQL CE, since it is for other MSSQL engines.)

    The square brackets basically tell the query engine, “This is an identifier for an object in the database.” They’re commonly used to wrap the names of database objects which contain spaces, since those otherwise wouldn’t parse correctly. But it’s also useful for objects which are reserved words.

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

Sidebar

Related Questions

i have a problem in inserting the listbox value into mysql database in vb
i have a problem in inserting the listbox value into mysql database in vb
I have a problem in php code inserting values into database (I use PHPMyAdmin).
I'm having a strange problem in that I have php inserting text into a
I have a problem inserting a datetime format variable to Sql Server 2005 database.
I have encountered a problem while inserting a large amounts of text into my
I have problems inserting a textboxvalue into a mysql database - there's no errormessage
I have problems with inserting some Chinese characters into the mysql database. It is
I have problem when I try insert some data to Informix TEXT column via
I'm inserting some HTML into a MySQL database table. But when I get it

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.