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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:01:22+00:00 2026-06-11T18:01:22+00:00

I have problem regarding insert operation in SQL Server CE, this is the exception

  • 0

I have problem regarding insert operation in SQL Server CE, this is the exception

enter image description here

and these are my code :

private void button1_Click(object sender, EventArgs e)
    {
        try
        {
            perintahsql = new SqlCeCommand("INSERT INTO lokasi (Campus, Address, Phone 1, Phone 2, Phone 3, Fax, Ext.number, Longitude, Latitude, Maps) VALUES (@Campus, @Address, @Phone 1, @Phone 2, @Phone 3, @Fax, @Ext.number, @Longitude, @Latitude, @Maps)", koneksi);
            perintahsql.Parameters.AddWithValue("@Campus", comboBox1.Text);
            perintahsql.Parameters.AddWithValue("@Address", textBox1.Text);
            perintahsql.Parameters.AddWithValue("@Phone 1", textBox2.Text);
            perintahsql.Parameters.AddWithValue("@Phone 2", textBox3.Text);
            perintahsql.Parameters.AddWithValue("@Phone 3", textBox4.Text);
            perintahsql.Parameters.AddWithValue("@Fax", textBox5.Text);
            perintahsql.Parameters.AddWithValue("@Ext. number", textBox6.Text);
            perintahsql.Parameters.AddWithValue("@Longitude", textBox7.Text);
            perintahsql.Parameters.AddWithValue("@Latitude", textBox8.Text);
            perintahsql.Parameters.AddWithValue("@Maps", textBox9.Text);
            koneksi.Open();
            perintahsql.ExecuteNonQuery();
            koneksi.Close();
        }
        catch (SqlCeException ex)
        {
            MessageBox.Show("Whoopss!! " + ex, "SQL Server CE Exception Message");
        }
    }

How to fix that error? Thank you.

  • 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-11T18:01:23+00:00Added an answer on June 11, 2026 at 6:01 pm

    Try renaming you variables, SQL doesnot permit variable with spaces.
    Change variables @Phone 1 as @Phone1 etc and also @Ext. number as @ExtNumber. Hope it will resolve your query.

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

Sidebar

Related Questions

I have the following code, and i have a problem regarding changing the ringtone
I have a problem regarding this query. I want to get the applicant latest
I have this intermittent problem with MySQL 5.1.33 (Community Server) for Windows, where the
I have a problem with running SQL*Plus in the bash. Here is my code
I have a question regarding performance of SQL Server. Suppose I have a table
I have 2-3 questions regarding my sql INSERT and how to go about combining
I have a problem reading a txt file to insert in the mysql db
I have a problem regarding StartUp Url in WPF. I have a LoginView.xaml and
I have a problem regarding the datediff MYSQL function, I can use it and
I have a problem regarding the ksoap2. My problem is that the project used

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.