Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,938 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,434 people online right now. Registration is fast and FREE... Join Now!




Making ADO work

 
Reply to this topicStart new topic

Making ADO work, Adding new data doesn't work - WHY? (Using details format)

Blacksmith
13 Dec, 2007 - 06:53 AM
Post #1

New D.I.C Head
*

Joined: 13 Dec, 2007
Posts: 1


My Contributions
CODE

Imports System.Data.OleDb
Imports System.Windows.Forms
Public Class ExpDBX
    Private Sub ExpDBBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExpDBBindingNavigatorSaveItem.Click
        If Me.Validate Then
            Me.ExpDBBindingSource.EndEdit()
            Me.ExpDBTableAdapter.Update(Me.ExpDBXDataSet.expDB)
        Else
            MessageBox.Show(Me, "Validation errors occurred.", "Save", MessageBoxButtons.OK, MessageBoxIcon.Warning)
        End If
    End Sub
    Private Sub ExpDBX_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'TODO: This line of code loads data into the 'ExpDBXDataSet.expDB' table. You can move, or remove it, as needed.
        Me.ExpDBTableAdapter.Fill(Me.ExpDBXDataSet.expDB)
    End Sub
End Class


I have tried to make a details form in order to bind textboxes to the fields in my database. The above code is generated.
I cannot add new values to the database and save them when I run the app. What the heck am I missing?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 04:26PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month