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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T07:10:53+00:00 2026-05-14T07:10:53+00:00

I have an C# form application that use an access database. This application works

  • 0

I have an C# form application that use an access database.

This application works perfectly in debug and release. It works on all version of Windows.
But it crash on one computer with Windows 7.

The message I got is:

System.Data.OleDb.OleDbException: No value given for one or more required parameters.

EDIT, after some debugging with messagebox on the computer that have the problem, here is the code that bug.The error is catched on the cmd.ExecuteReader(). The messagebox juste before is shown and the next one is the one in the catch with the exception below. Any ideas?

public List<CoeffItem> GetModeleCoeff()
    {

        List<CoeffItem> list = new List<CoeffItem>();
        try
        {
            OleDbDataReader dr;
            OleDbCommand cmd = new OleDbCommand("SELECT nIDModelAquacad, nIDModeleBorne, fCoefficient FROM tbl_ModelBorne ORDER BY nIDModelAquacad", m_conn);
            MessageBox.Show("Commande SQL créée avec succès");

            dr = cmd.ExecuteReader();

            MessageBox.Show("Exécution du reader sans problème!");

            while (dr.Read())
            {
                list.Add(new CoeffItem(Convert.ToInt32(dr["nIDModelAquacad"].ToString()),
                    Convert.ToInt32(dr["nIDModeleBorne"].ToString()),
                    Convert.ToDouble(dr["fCoefficient"].ToString())));
            }
            MessageBox.Show("Lecture du reader");

            dr.Close();
            MessageBox.Show("Fermeture du reader");
        }
        catch (OleDbException err)
        {
            MessageBox.Show("Erreur dans la lecture des modèles/coefficient: " + err.ToString());
        }
        return list;
    }

I think it’s something related to the connection string but why only on that computer.

Thanks for your help!

EDIT

Here is the complete error message:

See the end of this message for details on invoking

just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************

System.Data.OleDb.OleDbException: No value given for one or more required parameters.

   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)

   at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)

   at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)

   at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)

   at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)

   at System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior)

   at System.Data.OleDb.OleDbCommand.ExecuteReader()

   at DatabaseLayer.DatabaseFacade.GetModeleCoeff()

   at DatabaseLayer.DatabaseFacade.InitConnection(String strFile)

   at CalculatriceCHW.ListeMesure.OuvrirFichier(String strFichier)

   at CalculatriceCHW.ListeMesure.nouveauFichierMenu_Click(Object sender, EventArgs e)

   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)

   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)

   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)

   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)

   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)

   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)

   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)

   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)

   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

   at System.Windows.Forms.Control.WndProc(Message& m)

   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)

   at System.Windows.Forms.ToolStrip.WndProc(Message& m)

   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  • 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-14T07:10:54+00:00Added an answer on May 14, 2026 at 7:10 am

    Ok, here is what happened.

    The database missed 2 column in one table. The reason? Well, in the application, when the user click on “New”, a copy is made of the .mdb in the application folder to the location of the choice of the user. The “model” database is ok, all the column are there, but the copied file was missing 2 column. So I did a little research, a found that the application was using the Virtual Store of Windows 7 instead of the program file directory. Why? We think that the user saved the file right in the program file directory (something that cause a copy in the virtual store) with the old version of the app (and of the database). At this moment, the virtual store was used in priority to the program file and everything was not working.

    So thanks for all your help, it help me find the problem!

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

Sidebar

Ask A Question

Stats

  • Questions 368k
  • Answers 368k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Martin uses the Restlet API which defines its own simpler… May 14, 2026 at 6:00 pm
  • Editorial Team
    Editorial Team added an answer In my experience the fastest way for the server is… May 14, 2026 at 6:00 pm
  • Editorial Team
    Editorial Team added an answer I assume this is just an example. Why can't you… May 14, 2026 at 6:00 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.