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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:15:31+00:00 2026-05-26T07:15:31+00:00

New to C# from vb.net and I am just making some mock bound applications

  • 0

New to C# from vb.net and I am just making some mock bound applications for now. I have problems with the following code. If I pic an image and exit the application, there is no change. Even if I move a row. However if I upload an image, move to another row, then add another image. After exiting the application the first image will be there but not the second.

In short I have to attempt to upload to another record before the record I actually want updating will do so.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace DBUserManagement
{    
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'dsUsers.Users' table. You can move, or remove it, as needed.
            this.usersTableAdapter.Fill(this.dsUsers.Users);
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            if (DialogResult.OK == ofd.ShowDialog())
            {
                imgUser.SizeMode = PictureBoxSizeMode.StretchImage;
                imgUser.Image = new Bitmap(ofd.OpenFile());
                //update bound field.
                usersTableAdapter.Update(dsUsers);
            }
        }
    }
}

Any ideas on what I am missing or not understand correctly? Any help appreciated.

/P

  • 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-26T07:15:32+00:00Added an answer on May 26, 2026 at 7:15 am

    The answer was I needed to call the BindingSource’s .EndEdit(); method.

    So I am guessing it was down to the binding source still having hold of something.

    Seems like I’m on the right track anyhow, I looked up the details on MSDN 🙂

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

Sidebar

Related Questions

I'm just porting some code over from .net to Java. I've been using the
I come from a .NET world and I'm new to writting C++. I'm just
I'm doing some ASP.NET development in VS and have just found an interesting little
We just started a new ASP.Net project that uses web services to serialize some
Scalar-valued functions can be called from .NET as follows: SqlCommand cmd = new SqlCommand(testFunction,
I'm new to ASP.net, how can I read parameters passed from ASP.net page (
hello I'm new to PHP programming and I migrated from ASP .net to PHP..
How can MVC website benefit from the new parallelism features in .net 4? don't
The new extensions in .Net 3.5 allow functionality to be split out from interfaces.
I am new to ASP.NET and am trying to convert a web application from

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.