Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Database does not save

Posted on 2006-07-02
2
Medium Priority
?
181 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 2000 total points
ID: 17029829
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
ID: 17030553
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

783 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