Have do I save data in an Access database using Visual Studio 2005 Express, C# .NET?

I hope you are a C# .NET professional, because this is a nasty problem ;-)

I’d like to design an application that connects to an Access database.

Using Visual Studio 2005 Express Edition, I added the Access database to the Data Connections window (and the .mdb file is also shown in the solution explorer).

Next to that, I added a new DataSet related to the .mdf file.

Using this handy drag and drop technique I quickly added a DataGridView to my Designer surface.

If I run the program in Debug mode, add new records and hit the Save button, it seems to save the dataset back into the database (this idea is confirmed by the fact that the tableAdapter.Update() method returns a non-zero value).

However, if I rerun the program or look into my database using Access, nothing has changed.

Does anyone know what’s going on?

Notice that I don’t have this problem if I use an SQL database

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay

Tags: ,

This entry was posted on Friday, June 18th, 2010 at 11:50 am and is filed under Visual studio database edition. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

2 Responses to “Have do I save data in an Access database using Visual Studio 2005 Express, C# .NET?”

  1. Kevin Says:

    If I am not wrong, Access file is MDB, not MDF.

    MDF is SQL Database file.

    So I think you have the data update done into the SQL database rather than Access. (And you thinking is done on Access)

  2. Kevin Says:

    Hi,

    You might want to check that the Intenet Guest Account (IUSR_YOURCOMPNAME) has write access to the directory where your Access database is located. This account is used when connecting anonymously to IIS through a browser. :)

Leave a Reply

 

About - Contact - Privacy Policy - Terms of Service