Imports System.Data Imports System.Data.OleDb Public Class ControlFile Dim cnnOLEDB As New OleDbConnection Dim cmdOLEDB As New OleDbCommand Dim cmdInsert As New OleDbCommand Dim cmdUpdate As New OleDbCommand Dim cmdRemove As New OleDbCommand Dim strConnectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source= E:\VB Programs\AIS.accdb" Private Sub ControlFile_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load cnnOLEDB.ConnectionString = strConnectionString cnnOLEDB.Open() End Sub Private Sub cmdEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdEdit.Click If OrganizationTextBox.Text <> "" And CalendarYearTextBox.Text <> "" Then cmdUpdate.CommandText = "UPDATE ControlFile SET " & _ "Organization = '" & OrganizationTextBox.Text & "', " & _ "CalendarYear = '" & CalendarYearTextBox.Text & "', " & _ "EarningsControl = '" & EarningsControlTextBox.Text & "', " & _ "EarningsAccount = '" & EarningsAccountTextBox.Text & "', " & _ "RetainedControl = '" & RetainedControlTextBox.Text & "', " & _ "RetainedAccount = '" & RetainedAccountTextBox.Text & "', " & _ "DebitCredit = '" & DebitCreditTextBox.Text & "', " & _ "CurrentPeriod = '" & CurrentPeriodTextBox.Text & "', " & _ "WHERE Organization = '" & OrganizationTextBox.Text & "'"
"CurrentPeriod = '" & CurrentPeriodTextBox.Text & "' " & _ "WHERE Organization = '" & OrganizationTextBox.Text & "'"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)