Solved

Database does not save

Posted on 2006-07-02
2
172 Views
Last Modified: 2010-04-23
Hi
I am completely new to working with databases and would appreciate some help as this is driving me crazy.

I am using VB.net 2005 and have added a datasource (an existing Access database).
I have then dragged the datasource to a form and vb.net has added a datagridview and generated the following code

Public Class Form1

    Private Sub LicencesBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LicencesBindingNavigatorSaveItem.Click
        Me.Validate()
        Me.LicencesBindingSource.EndEdit()
        Me.LicencesTableAdapter.Update(Me.LicencesDataSet.Licences)

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'LicencesDataSet.Licences' table. You can move, or remove it, as needed.
        Me.LicencesTableAdapter.Fill(Me.LicencesDataSet.Licences)

    End Sub
End Class

The problem is that LicencesBindingNavigatorSaveItem_Click does not save the changed data to the database.

All help much appreciated.

Best Regards
Alun Gwyther
0
Comment
Question by:alungwyther
2 Comments
 
LVL 34

Accepted Solution

by:
Sancler earned 500 total points
Comment Utility
There is nothing on the face of the code you show, or in your description, which should stop the update occurring.  So have a look at this

http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/VB_DOT_NET/Q_21896499.html#16967706

It covers one possibility.  If that is not the answer, can you come back with a bit more description about how you know that it "does not save the changed data to the database"?

Roger
0
 

Author Comment

by:alungwyther
Comment Utility
That was it, many thanks.
I don't know how long it would have taken for me to figure that out.
Cheers
Alun
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now