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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:43:56+00:00 2026-05-30T15:43:56+00:00

I bumped into a strange problem with one of my newest small tools. I

  • 0

I bumped into a strange problem with one of my newest small tools.

I have one SQLite database with one Table (Journal) inside. I’m editing the data via a DataGrid which works fine. But sometimes for unapparent reason and without any exceptions it just does not write changes or new rows back to the database. That’s pretty annoying you can guess. Here’s my code:

    private JournalTableAdapter adapter = new JournalTableAdapter();
    private DataSetAccounting dataset = new DataSetAccounting();

    public MainWindow()
    {
        InitializeComponent();

        adapter.Connection = new SQLiteConnection("Data Source=Database/accounting.s3db");
        adapter.Fill(dataset.Journal);

        dataset.Journal.JournalRowChanged
            += new DataSetAccounting.JournalRowChangeEventHandler(Journal_JournalRowModified);
        dataset.Journal.JournalRowDeleted
            += new DataSetAccounting.JournalRowChangeEventHandler(Journal_JournalRowModified);
        dataset.Journal.TableNewRow
            += new System.Data.DataTableNewRowEventHandler(Journal_TableNewRow);

        dataGridAccounting.DataContext = dataset.Journal.DefaultView;
    }

    void Journal_JournalRowModified(object sender, DataSetAccounting.JournalRowChangeEvent e)
    {
        e.Row.EndEdit();
        adapter.Update(dataset.Journal);
    }

    void Journal_TableNewRow(object sender, System.Data.DataTableNewRowEventArgs e)
    {
        e.Row[2] = DateTime.Now.Date;
    }

Pretty simple and easy I thought but not working like I expected =/ I don’t work with ADO.NET/SQL-Adapters a lot so please be merciful 🙂

Sincerely yours,
Nefarius

  • 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-30T15:43:57+00:00Added an answer on May 30, 2026 at 3:43 pm

    Meh, sorry, I’m stupid. I used the auto-generated version of the dataset by visual studio which compares every parameter in the WHERE-part, so ofc. he can’t find the original row in the DB. While running in VS I could reproduce the error and got an exception. Nevermind, I’ll continue reading my C#/ADO.NET book =)

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

Sidebar

Related Questions

During usage of NHibernate ... One strange problem that I have bumped into was
I have recently started programming in WPF and bumped into the following problem. I
I am running php 5.3, and have bumped into a problem I've not encountered
I've bumped into a small problem that i cant seem to find the fix
I have bumped into this problem several times on the type of input data
I've bumped into a strange problem. I wrote a little daemon in Perl which
I ran into a problem... perhaps someone bumped into something similar: I have an
Bumped into a strange situation here. Trying to extract cars from a sql database
I am doing some localization and have bumped into a problem that I cant
While creating a small aplication in ExtGwt I've bumped into such problem: Is there

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.