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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:06:05+00:00 2026-06-02T00:06:05+00:00

I am using a SQL CE 3.5 database in my C# project. When I

  • 0

I am using a SQL CE 3.5 database in my C# project.

When I am adding new data to a table, let’s say a simple row, I feel like I am doing it totally wrong. What I am doing is something like this:

const string commandStr = "INSERT INTO tableName (size, x, y) VALUES(@size, @x, @y)";
using (SqlCeCommand command = new SqlCeCommand(commandStr, _connection))
{
    command.Parameters.AddWithValue("@size", size);
    command.Parameters.AddWithValue("@x", x);
    command.Parameters.AddWithValue("@y", y);
    int affectedRows = command.ExecuteNonQuery();
}

Of course, my actual table that I am using in my project has a lot more collumns. Obviously, this is a lot of typing.
This brings me to the point where I am thinking: “I am a .NET devoloper. There must be something that feels a lot more naturally.”

So my questions are:
Is there a nicer way to do this? If so, how?

  • 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-02T00:06:06+00:00Added an answer on June 2, 2026 at 12:06 am

    Sometimes there are edge cases where doing it your way is required. However, for a full, verbose, “.NET developer” feel, try Entity Framework. It is awesome.

    Entity Framework is so nice for this in my opinion. I really enjoy using it.

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

Sidebar

Related Questions

I am using a SQL Server database in my current project. I was watching
I am using SQL Server CE database and C# language. I have a table
I'm new to using SQL Server 2008 DB Project's in VS 2010. I found
I'm using a SQL Server 2008 Database Project, and I'm finding it's very cumbersome
When I try adding a new data source to my project I get a
I've created a simple project with an SQL Server database with dozens of tables
We are using the SQL Server Database project template with Visual Studio 2010. As part of
I am using a SQL 2008 database project (in visual studio) to manage the
I'm using JPA+Hibernate with a PostGre SQL database in a J2SE project. I have
I am using two web projects and both using same Database of MS SQL

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.