Download the code.
Important: You must add the ADO .NET objects using the database in your own environment and bind them to the form components as described in the Part 3 of this series. Database objects are not included in the download. Don't forget to add the bindings in the properties for the TextBox and the ListBox!
Public Class Form1
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Private Sub Form1_Load( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles MyBase.Load
' Selects only Wrox books if Value is "W";
' only VBA books if Value is "VBA"
' This is permitted when the SQL statement
' in the DataAdapter control
' has a WHERE clause:
' WHERE (artTitle LIKE ? + '%')
Me.OleDbDataAdapter1.SelectCommand.Parameters(0).Value _
= "VBA"
Me.OleDbDataAdapter1.Fill(Me.DataSet11)
End Sub
Private Sub Button1_Click( _
ByVal sender As System.Object, _
ByVal e As System.EventArgs) _
Handles cmdChangeTitle.Click
Me.BindingContext(Me.DataSet11, _
"Articles").EndCurrentEdit()
Me.OleDbDataAdapter1.Update(Me.DataSet11, "Articles")
Me.DataSet11.AcceptChanges()
End Sub
End Class
First page >
When Something Has To Change! > Page
1,
2,
3,
4