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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:37:25+00:00 2026-05-16T11:37:25+00:00

I am able to retrieve database values and insert database values, but I can’t

  • 0

I am able to retrieve database values and insert database values, but I can’t figure out what the Update() syntax should be with a where statement.

Environment -> ASP.Net, C#

Settings.ttinclude

    const string Namespace = "subsonic_db.Data";
    const string ConnectionStringName = "subsonic_dbConnectionString";

    //This is the name of your database and is used in naming
    //the repository. By default we set it to the connection string name
    const string DatabaseName = "subsonic_db";

Retreive example

var product = equipment.SingleOrDefault(x => x.id == 1);

Insert Example

   equipment my_equipment = new equipment();

    try
    {
        // insert
        my_equipment.parent_id = 0;
        my_equipment.primary_id = 0;
        my_equipment.product_code = product_code.Text;
        my_equipment.product_description = product_description.Text;
        my_equipment.product_type_id = Convert.ToInt32(product_type_id.SelectedItem.Value);
        my_equipment.created_date = DateTime.Now;
        my_equipment.serial_number = serial_number.Text;

        my_equipment.Save();

    }
    catch (Exception err)
    {
        lblError.Text = err.Message;
    }

Edit: Think that I was just too tired last night, it is pretty easy to update. Just use the retrieve function and use the Update() on that.

    var equip = Equipment.SingleOrDefault(x => x.id == 1);

    lblGeneral.Text = equip.product_description;

    equip.product_description = "Test";
    equip.Update();
  • 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-16T11:37:26+00:00Added an answer on May 16, 2026 at 11:37 am

    Resolved. View answer above.

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

Sidebar

Related Questions

I am able to retrieve information from a SQLite database in PHP, but not
I have been able to retrieve values into my form.The values are inserted into
I'm trying to send selected checkbox values to another asp page to update database.
I am trying to retrieve some rows from the database using simple SELECT statement
I have a local database and I want to be able to retrieve and
in my application i have used sqlite database. I am able to insert the
hi i want to retrieve values from SQL database for xml tags using java
I'm able to retrieve the current location in my iPad application using, CLLocation *location
I am able to retrieve the sum/total sales for all items in a particular
I am not able to retrieve the data from the server. I am not

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.