Solved

manipulating records in textboxes bound to an Access Database in vb.net

Posted on 2003-11-26
12
528 Views
Last Modified: 2008-03-10
I've created four forms. On the first form I have 2 combo boxes and 5 textboxes that are connected to an oledbadapter and have generated datasets. I can manuver through the database but can not add, edit or delete these files. Any ideas?
0
Comment
Question by:mixmates
  • 6
  • 6
12 Comments
 
LVL 27

Expert Comment

by:Dabas
ID: 9828978
Hi mixmates,
Can you post the contents of the first form here?

Dabas
0
 

Author Comment

by:mixmates
ID: 9829030
Here's the form code there is a lot of erroneous information from experimentation with code but if you have any questions let me know


Public Class Form1
    Inherits System.Windows.Forms.Form


#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents txtRecord As System.Windows.Forms.TextBox
    Friend WithEvents Clinic1 As WindowsApplication3.clinic
    Friend WithEvents lblRecord As System.Windows.Forms.Label
    Friend WithEvents cmdExit As System.Windows.Forms.Button
    Friend WithEvents Button1 As System.Windows.Forms.Button
    Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents txtLastName As System.Windows.Forms.TextBox
    Friend WithEvents lblLastName As System.Windows.Forms.Label
    Friend WithEvents txtFirstName As System.Windows.Forms.TextBox
    Friend WithEvents lblFirstName As System.Windows.Forms.Label
    Friend WithEvents Button3 As System.Windows.Forms.Button
    Friend WithEvents Button4 As System.Windows.Forms.Button
    Friend WithEvents cmbprovider As System.Windows.Forms.ComboBox
    Friend WithEvents lblProvider As System.Windows.Forms.Label
    Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
    Friend WithEvents MenuItem10 As System.Windows.Forms.MenuItem
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents cmbPayCode As System.Windows.Forms.ComboBox
    Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
    Friend WithEvents OleDbDataAdapter2 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbSelectCommand2 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents DataSet41 As WindowsApplication3.DataSet4
    Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    Friend WithEvents Button2 As System.Windows.Forms.Button
    Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
    Friend WithEvents OleDbDataAdapter3 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbSelectCommand3 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand3 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand3 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand3 As System.Data.OleDb.OleDbCommand
    Friend WithEvents Dataprov11 As WindowsApplication3.Dataprov1
    Friend WithEvents Button5 As System.Windows.Forms.Button
    Friend WithEvents OleDbSelectCommand4 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand4 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand4 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand4 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDataAdapter4 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand2 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand2 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand2 As System.Data.OleDb.OleDbCommand
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.txtRecord = New System.Windows.Forms.TextBox
        Me.Clinic1 = New WindowsApplication3.clinic
        Me.lblRecord = New System.Windows.Forms.Label
        Me.cmdExit = New System.Windows.Forms.Button
        Me.Button1 = New System.Windows.Forms.Button
        Me.MainMenu1 = New System.Windows.Forms.MainMenu
        Me.MenuItem1 = New System.Windows.Forms.MenuItem
        Me.MenuItem2 = New System.Windows.Forms.MenuItem
        Me.MenuItem10 = New System.Windows.Forms.MenuItem
        Me.MenuItem4 = New System.Windows.Forms.MenuItem
        Me.txtLastName = New System.Windows.Forms.TextBox
        Me.lblLastName = New System.Windows.Forms.Label
        Me.txtFirstName = New System.Windows.Forms.TextBox
        Me.lblFirstName = New System.Windows.Forms.Label
        Me.Button3 = New System.Windows.Forms.Button
        Me.Button4 = New System.Windows.Forms.Button
        Me.cmbprovider = New System.Windows.Forms.ComboBox
        Me.Dataprov11 = New WindowsApplication3.Dataprov1
        Me.lblProvider = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.cmbPayCode = New System.Windows.Forms.ComboBox
        Me.DataSet41 = New WindowsApplication3.DataSet4
        Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter
        Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection
        Me.OleDbDataAdapter2 = New System.Data.OleDb.OleDbDataAdapter
        Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbSelectCommand2 = New System.Data.OleDb.OleDbCommand
        Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand
        Me.TextBox1 = New System.Windows.Forms.TextBox
        Me.Button2 = New System.Windows.Forms.Button
        Me.OleDbDataAdapter3 = New System.Data.OleDb.OleDbDataAdapter
        Me.OleDbDeleteCommand3 = New System.Data.OleDb.OleDbCommand
        Me.OleDbInsertCommand3 = New System.Data.OleDb.OleDbCommand
        Me.OleDbSelectCommand3 = New System.Data.OleDb.OleDbCommand
        Me.OleDbUpdateCommand3 = New System.Data.OleDb.OleDbCommand
        Me.Button5 = New System.Windows.Forms.Button
        Me.OleDbSelectCommand4 = New System.Data.OleDb.OleDbCommand
        Me.OleDbInsertCommand4 = New System.Data.OleDb.OleDbCommand
        Me.OleDbUpdateCommand4 = New System.Data.OleDb.OleDbCommand
        Me.OleDbDeleteCommand4 = New System.Data.OleDb.OleDbCommand
        Me.OleDbDataAdapter4 = New System.Data.OleDb.OleDbDataAdapter
        Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand
        Me.OleDbInsertCommand2 = New System.Data.OleDb.OleDbCommand
        Me.OleDbUpdateCommand2 = New System.Data.OleDb.OleDbCommand
        Me.OleDbDeleteCommand2 = New System.Data.OleDb.OleDbCommand
        CType(Me.Clinic1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.Dataprov11, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.DataSet41, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'txtRecord
        '
        Me.txtRecord.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.Record ID"))
        Me.txtRecord.Location = New System.Drawing.Point(32, 48)
        Me.txtRecord.Name = "txtRecord"
        Me.txtRecord.Size = New System.Drawing.Size(128, 20)
        Me.txtRecord.TabIndex = 0
        Me.txtRecord.Text = ""
        '
        'Clinic1
        '
        Me.Clinic1.DataSetName = "clinic"
        Me.Clinic1.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'lblRecord
        '
        Me.lblRecord.Location = New System.Drawing.Point(32, 32)
        Me.lblRecord.Name = "lblRecord"
        Me.lblRecord.Size = New System.Drawing.Size(104, 16)
        Me.lblRecord.TabIndex = 1
        Me.lblRecord.Text = "Record Number"
        '
        'cmdExit
        '
        Me.cmdExit.Location = New System.Drawing.Point(680, 304)
        Me.cmdExit.Name = "cmdExit"
        Me.cmdExit.Size = New System.Drawing.Size(64, 24)
        Me.cmdExit.TabIndex = 2
        Me.cmdExit.Text = "Exit"
        '
        'Button1
        '
        Me.Button1.Location = New System.Drawing.Point(576, 304)
        Me.Button1.Name = "Button1"
        Me.Button1.TabIndex = 3
        Me.Button1.Text = "view"
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem2})
        '
        'MenuItem1
        '
        Me.MenuItem1.Index = 0
        Me.MenuItem1.Text = "File"
        '
        'MenuItem2
        '
        Me.MenuItem2.Index = 1
        Me.MenuItem2.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem10, Me.MenuItem4})
        Me.MenuItem2.Text = "Tools"
        '
        'MenuItem10
        '
        Me.MenuItem10.Index = 0
        Me.MenuItem10.Text = "Add pay codes"
        '
        'MenuItem4
        '
        Me.MenuItem4.Index = 1
        Me.MenuItem4.Text = "Add Providers"
        '
        'txtLastName
        '
        Me.txtLastName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.Last Name"))
        Me.txtLastName.Location = New System.Drawing.Point(32, 104)
        Me.txtLastName.Name = "txtLastName"
        Me.txtLastName.Size = New System.Drawing.Size(128, 20)
        Me.txtLastName.TabIndex = 4
        Me.txtLastName.Text = ""
        '
        'lblLastName
        '
        Me.lblLastName.Location = New System.Drawing.Point(32, 88)
        Me.lblLastName.Name = "lblLastName"
        Me.lblLastName.Size = New System.Drawing.Size(112, 16)
        Me.lblLastName.TabIndex = 5
        Me.lblLastName.Text = "Last Name"
        '
        'txtFirstName
        '
        Me.txtFirstName.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.First Name"))
        Me.txtFirstName.Location = New System.Drawing.Point(176, 104)
        Me.txtFirstName.Name = "txtFirstName"
        Me.txtFirstName.Size = New System.Drawing.Size(120, 20)
        Me.txtFirstName.TabIndex = 6
        Me.txtFirstName.Text = ""
        '
        'lblFirstName
        '
        Me.lblFirstName.Location = New System.Drawing.Point(176, 88)
        Me.lblFirstName.Name = "lblFirstName"
        Me.lblFirstName.Size = New System.Drawing.Size(104, 16)
        Me.lblFirstName.TabIndex = 7
        Me.lblFirstName.Text = "First Name"
        '
        'Button3
        '
        Me.Button3.Location = New System.Drawing.Point(424, 200)
        Me.Button3.Name = "Button3"
        Me.Button3.Size = New System.Drawing.Size(56, 32)
        Me.Button3.TabIndex = 9
        Me.Button3.Text = "Next"
        '
        'Button4
        '
        Me.Button4.Location = New System.Drawing.Point(144, 200)
        Me.Button4.Name = "Button4"
        Me.Button4.Size = New System.Drawing.Size(56, 32)
        Me.Button4.TabIndex = 10
        Me.Button4.Text = "add"
        '
        'cmbprovider
        '
        Me.cmbprovider.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.ContractorID"))
        Me.cmbprovider.DataSource = Me.Dataprov11
        Me.cmbprovider.DisplayMember = "provobj.Provider"
        Me.cmbprovider.Location = New System.Drawing.Point(360, 104)
        Me.cmbprovider.Name = "cmbprovider"
        Me.cmbprovider.Size = New System.Drawing.Size(136, 21)
        Me.cmbprovider.TabIndex = 11
        '
        'Dataprov11
        '
        Me.Dataprov11.DataSetName = "Dataprov1"
        Me.Dataprov11.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'lblProvider
        '
        Me.lblProvider.Location = New System.Drawing.Point(360, 88)
        Me.lblProvider.Name = "lblProvider"
        Me.lblProvider.Size = New System.Drawing.Size(128, 16)
        Me.lblProvider.TabIndex = 12
        Me.lblProvider.Text = "Provider"
        '
        'Label1
        '
        Me.Label1.Location = New System.Drawing.Point(544, 88)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(80, 16)
        Me.Label1.TabIndex = 14
        Me.Label1.Text = "Paycodes"
        '
        'cmbPayCode
        '
        Me.cmbPayCode.AllowDrop = True
        Me.cmbPayCode.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.Service Code"))
        Me.cmbPayCode.DataSource = Me.DataSet41
        Me.cmbPayCode.DisplayMember = "payCode.payCode"
        Me.cmbPayCode.Location = New System.Drawing.Point(544, 104)
        Me.cmbPayCode.Name = "cmbPayCode"
        Me.cmbPayCode.Size = New System.Drawing.Size(184, 21)
        Me.cmbPayCode.TabIndex = 15
        '
        'DataSet41
        '
        Me.DataSet41.DataSetName = "DataSet4"
        Me.DataSet41.Locale = New System.Globalization.CultureInfo("en-US")
        '
        'OleDbDataAdapter1
        '
        Me.OleDbDataAdapter1.DeleteCommand = Me.OleDbDeleteCommand2
        Me.OleDbDataAdapter1.InsertCommand = Me.OleDbInsertCommand2
        Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
        Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "clinic", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("Amount of Service", "Amount of Service"), New System.Data.Common.DataColumnMapping("Amount Paid at Time of Service", "Amount Paid at Time of Service"), New System.Data.Common.DataColumnMapping("ContractorID", "ContractorID"), New System.Data.Common.DataColumnMapping("Date of Service", "Date of Service"), New System.Data.Common.DataColumnMapping("Discount on Service", "Discount on Service"), New System.Data.Common.DataColumnMapping("First Name", "First Name"), New System.Data.Common.DataColumnMapping("Last Name", "Last Name"), New System.Data.Common.DataColumnMapping("Lytec Number", "Lytec Number"), New System.Data.Common.DataColumnMapping("Record ID", "Record ID"), New System.Data.Common.DataColumnMapping("Service Code", "Service Code"), New System.Data.Common.DataColumnMapping("Service Description", "Service Description"), New System.Data.Common.DataColumnMapping("serviceType", "serviceType")})})
        Me.OleDbDataAdapter1.UpdateCommand = Me.OleDbUpdateCommand2
        '
        'OleDbConnection1
        '
        Me.OleDbConnection1.ConnectionString = "Jet OLEDB:Registry Path=;Data Source=""C:\Documents and Settings\Administrator\Des" & _
        "ktop\clinic project\clinic.mdb"";Jet OLEDB:System database=;Jet OLEDB:Global Bulk" & _
        " Transactions=1;User ID=Admin;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:Don't" & _
        " Copy Locale on Compact=False;Jet OLEDB:SFP=False;Jet OLEDB:Encrypt Database=Fal" & _
        "se;Jet OLEDB:Engine Type=5;Jet OLEDB:Compact Without Replica Repair=False;Jet OL" & _
        "EDB:Global Partial Bulk Ops=2;Extended Properties=;Mode=Share Deny None;Jet OLED" & _
        "B:Create System Database=False;Jet OLEDB:Database Locking Mode=1"
        '
        'OleDbDataAdapter2
        '
        Me.OleDbDataAdapter2.DeleteCommand = Me.OleDbDeleteCommand1
        Me.OleDbDataAdapter2.InsertCommand = Me.OleDbInsertCommand1
        Me.OleDbDataAdapter2.SelectCommand = Me.OleDbSelectCommand2
        Me.OleDbDataAdapter2.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "payCode", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("charge", "charge"), New System.Data.Common.DataColumnMapping("cost", "cost"), New System.Data.Common.DataColumnMapping("drsPay", "drsPay"), New System.Data.Common.DataColumnMapping("payCode", "payCode"), New System.Data.Common.DataColumnMapping("recordId", "recordId")})})
        Me.OleDbDataAdapter2.UpdateCommand = Me.OleDbUpdateCommand1
        '
        'OleDbDeleteCommand1
        '
        Me.OleDbDeleteCommand1.CommandText = "DELETE FROM payCode WHERE (recordId = ?) AND (charge = ? OR ? IS NULL AND charge " & _
        "IS NULL) AND (cost = ? OR ? IS NULL AND cost IS NULL) AND (drsPay = ? OR ? IS NU" & _
        "LL AND drsPay IS NULL) AND (payCode = ? OR ? IS NULL AND payCode IS NULL)"
        Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_recordId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "recordId", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_charge", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "charge", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_charge1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "charge", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_cost", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "cost", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_cost1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "cost", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_drsPay", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "drsPay", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_drsPay1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "drsPay", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_payCode", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "payCode", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_payCode1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "payCode", System.Data.DataRowVersion.Original, Nothing))
        '
        'OleDbInsertCommand1
        '
        Me.OleDbInsertCommand1.CommandText = "INSERT INTO payCode(charge, cost, drsPay, payCode) VALUES (?, ?, ?, ?)"
        Me.OleDbInsertCommand1.Connection = Me.OleDbConnection1
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("charge", System.Data.OleDb.OleDbType.Currency, 0, "charge"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("cost", System.Data.OleDb.OleDbType.Currency, 0, "cost"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("drsPay", System.Data.OleDb.OleDbType.Currency, 0, "drsPay"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("payCode", System.Data.OleDb.OleDbType.Integer, 0, "payCode"))
        '
        'OleDbSelectCommand2
        '
        Me.OleDbSelectCommand2.CommandText = "SELECT charge, cost, drsPay, payCode, recordId FROM payCode"
        Me.OleDbSelectCommand2.Connection = Me.OleDbConnection1
        '
        'OleDbUpdateCommand1
        '
        Me.OleDbUpdateCommand1.CommandText = "UPDATE payCode SET charge = ?, cost = ?, drsPay = ?, payCode = ? WHERE (recordId " & _
        "= ?) AND (charge = ? OR ? IS NULL AND charge IS NULL) AND (cost = ? OR ? IS NULL" & _
        " AND cost IS NULL) AND (drsPay = ? OR ? IS NULL AND drsPay IS NULL) AND (payCode" & _
        " = ? OR ? IS NULL AND payCode IS NULL)"
        Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("charge", System.Data.OleDb.OleDbType.Currency, 0, "charge"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("cost", System.Data.OleDb.OleDbType.Currency, 0, "cost"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("drsPay", System.Data.OleDb.OleDbType.Currency, 0, "drsPay"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("payCode", System.Data.OleDb.OleDbType.Integer, 0, "payCode"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_recordId", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "recordId", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_charge", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "charge", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_charge1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "charge", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_cost", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "cost", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_cost1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "cost", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_drsPay", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "drsPay", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_drsPay1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "drsPay", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_payCode", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "payCode", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_payCode1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "payCode", System.Data.DataRowVersion.Original, Nothing))
        '
        'TextBox1
        '
        Me.TextBox1.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Clinic1, "clinic.Amount of Service"))
        Me.TextBox1.Location = New System.Drawing.Point(32, 152)
        Me.TextBox1.Name = "TextBox1"
        Me.TextBox1.Size = New System.Drawing.Size(128, 20)
        Me.TextBox1.TabIndex = 16
        Me.TextBox1.Text = "txtAmtsvc"
        '
        'Button2
        '
        Me.Button2.Location = New System.Drawing.Point(272, 200)
        Me.Button2.Name = "Button2"
        Me.Button2.Size = New System.Drawing.Size(64, 32)
        Me.Button2.TabIndex = 17
        Me.Button2.Text = "refresh"
        '
        'OleDbDataAdapter3
        '
        Me.OleDbDataAdapter3.DeleteCommand = Me.OleDbDeleteCommand3
        Me.OleDbDataAdapter3.InsertCommand = Me.OleDbInsertCommand3
        Me.OleDbDataAdapter3.SelectCommand = Me.OleDbSelectCommand3
        Me.OleDbDataAdapter3.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "provobj", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ID", "ID"), New System.Data.Common.DataColumnMapping("Provider", "Provider")})})
        Me.OleDbDataAdapter3.UpdateCommand = Me.OleDbUpdateCommand3
        '
        'OleDbDeleteCommand3
        '
        Me.OleDbDeleteCommand3.CommandText = "DELETE FROM provobj WHERE (ID = ?) AND (Provider = ? OR ? IS NULL AND Provider IS" & _
        " NULL)"
        Me.OleDbDeleteCommand3.Connection = Me.OleDbConnection1
        Me.OleDbDeleteCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Provider", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Provider", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Provider1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Provider", System.Data.DataRowVersion.Original, Nothing))
        '
        'OleDbInsertCommand3
        '
        Me.OleDbInsertCommand3.CommandText = "INSERT INTO provobj(Provider) VALUES (?)"
        Me.OleDbInsertCommand3.Connection = Me.OleDbConnection1
        Me.OleDbInsertCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Provider", System.Data.OleDb.OleDbType.VarWChar, 50, "Provider"))
        '
        'OleDbSelectCommand3
        '
        Me.OleDbSelectCommand3.CommandText = "SELECT ID, Provider FROM provobj"
        Me.OleDbSelectCommand3.Connection = Me.OleDbConnection1
        '
        'OleDbUpdateCommand3
        '
        Me.OleDbUpdateCommand3.CommandText = "UPDATE provobj SET Provider = ? WHERE (ID = ?) AND (Provider = ? OR ? IS NULL AND" & _
        " Provider IS NULL)"
        Me.OleDbUpdateCommand3.Connection = Me.OleDbConnection1
        Me.OleDbUpdateCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Provider", System.Data.OleDb.OleDbType.VarWChar, 50, "Provider"))
        Me.OleDbUpdateCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Provider", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Provider", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand3.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Provider1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Provider", System.Data.DataRowVersion.Original, Nothing))
        '
        'Button5
        '
        Me.Button5.Location = New System.Drawing.Point(584, 184)
        Me.Button5.Name = "Button5"
        Me.Button5.Size = New System.Drawing.Size(40, 40)
        Me.Button5.TabIndex = 18
        Me.Button5.Text = "Button5"
        '
        'OleDbDataAdapter4
        '
        Me.OleDbDataAdapter4.DeleteCommand = Me.OleDbDeleteCommand4
        Me.OleDbDataAdapter4.InsertCommand = Me.OleDbInsertCommand4
        Me.OleDbDataAdapter4.SelectCommand = Me.OleDbSelectCommand4
        Me.OleDbDataAdapter4.UpdateCommand = Me.OleDbUpdateCommand4
        '
        'OleDbSelectCommand1
        '
        Me.OleDbSelectCommand1.CommandText = "SELECT [Amount of Service], [Amount Paid at Time of Service], ContractorID, [Date" & _
        " of Service], [Discount on Service], [First Name], [Last Name], [Lytec Number], " & _
        "[Record ID], [Service Code], [Service Description], serviceType FROM clinic"
        Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
        '
        'OleDbInsertCommand2
        '
        Me.OleDbInsertCommand2.CommandText = "INSERT INTO clinic([Amount of Service], [Amount Paid at Time of Service], Contrac" & _
        "torID, [Date of Service], [Discount on Service], [First Name], [Last Name], [Lyt" & _
        "ec Number], [Service Code], [Service Description], serviceType) VALUES (?, ?, ?," & _
        " ?, ?, ?, ?, ?, ?, ?, ?)"
        Me.OleDbInsertCommand2.Connection = Me.OleDbConnection1
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Amount_of_Service", System.Data.OleDb.OleDbType.Currency, 0, "Amount of Service"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Amount_Paid_at_Time_of_Service", System.Data.OleDb.OleDbType.Currency, 0, "Amount Paid at Time of Service"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("ContractorID", System.Data.OleDb.OleDbType.VarWChar, 50, "ContractorID"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Date_of_Service", System.Data.OleDb.OleDbType.DBDate, 0, "Date of Service"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Discount_on_Service", System.Data.OleDb.OleDbType.Currency, 0, "Discount on Service"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("First_Name", System.Data.OleDb.OleDbType.VarWChar, 50, "First Name"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Last_Name", System.Data.OleDb.OleDbType.VarWChar, 50, "Last Name"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Lytec_Number", System.Data.OleDb.OleDbType.Integer, 0, "Lytec Number"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Service_Code", System.Data.OleDb.OleDbType.Integer, 0, "Service Code"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Service_Description", System.Data.OleDb.OleDbType.VarWChar, 50, "Service Description"))
        Me.OleDbInsertCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("serviceType", System.Data.OleDb.OleDbType.VarWChar, 50, "serviceType"))
        '
        'OleDbUpdateCommand2
        '
        Me.OleDbUpdateCommand2.CommandText = "UPDATE clinic SET [Amount of Service] = ?, [Amount Paid at Time of Service] = ?, " & _
        "ContractorID = ?, [Date of Service] = ?, [Discount on Service] = ?, [First Name]" & _
        " = ?, [Last Name] = ?, [Lytec Number] = ?, [Service Code] = ?, [Service Descript" & _
        "ion] = ?, serviceType = ? WHERE ([Record ID] = ?) AND ([Amount Paid at Time of S" & _
        "ervice] = ? OR ? IS NULL AND [Amount Paid at Time of Service] IS NULL) AND ([Amo" & _
        "unt of Service] = ? OR ? IS NULL AND [Amount of Service] IS NULL) AND (Contracto" & _
        "rID = ? OR ? IS NULL AND ContractorID IS NULL) AND ([Date of Service] = ? OR ? I" & _
        "S NULL AND [Date of Service] IS NULL) AND ([Discount on Service] = ? OR ? IS NUL" & _
        "L AND [Discount on Service] IS NULL) AND ([First Name] = ? OR ? IS NULL AND [Fir" & _
        "st Name] IS NULL) AND ([Last Name] = ? OR ? IS NULL AND [Last Name] IS NULL) AND" & _
        " ([Lytec Number] = ? OR ? IS NULL AND [Lytec Number] IS NULL) AND ([Service Code" & _
        "] = ? OR ? IS NULL AND [Service Code] IS NULL) AND ([Service Description] = ? OR" & _
        " ? IS NULL AND [Service Description] IS NULL) AND (serviceType = ? OR ? IS NULL " & _
        "AND serviceType IS NULL)"
        Me.OleDbUpdateCommand2.Connection = Me.OleDbConnection1
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Amount_of_Service", System.Data.OleDb.OleDbType.Currency, 0, "Amount of Service"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Amount_Paid_at_Time_of_Service", System.Data.OleDb.OleDbType.Currency, 0, "Amount Paid at Time of Service"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("ContractorID", System.Data.OleDb.OleDbType.VarWChar, 50, "ContractorID"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Date_of_Service", System.Data.OleDb.OleDbType.DBDate, 0, "Date of Service"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Discount_on_Service", System.Data.OleDb.OleDbType.Currency, 0, "Discount on Service"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("First_Name", System.Data.OleDb.OleDbType.VarWChar, 50, "First Name"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Last_Name", System.Data.OleDb.OleDbType.VarWChar, 50, "Last Name"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Lytec_Number", System.Data.OleDb.OleDbType.Integer, 0, "Lytec Number"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Service_Code", System.Data.OleDb.OleDbType.Integer, 0, "Service Code"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Service_Description", System.Data.OleDb.OleDbType.VarWChar, 50, "Service Description"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("serviceType", System.Data.OleDb.OleDbType.VarWChar, 50, "serviceType"))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Record_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Record ID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_Paid_at_Time_of_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount Paid at Time of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_Paid_at_Time_of_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount Paid at Time of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_of_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_of_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ContractorID", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ContractorID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ContractorID1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ContractorID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Date_of_Service", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Date of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Date_of_Service1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Date of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Discount_on_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Discount on Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Discount_on_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Discount on Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_First_Name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "First Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_First_Name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "First Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Last_Name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Last Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Last_Name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Last Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Lytec_Number", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Lytec Number", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Lytec_Number1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Lytec Number", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Code", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Code", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Code1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Code", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Description", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Description", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Description1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Description", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_serviceType", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "serviceType", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_serviceType1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "serviceType", System.Data.DataRowVersion.Original, Nothing))
        '
        'OleDbDeleteCommand2
        '
        Me.OleDbDeleteCommand2.CommandText = "DELETE FROM clinic WHERE ([Record ID] = ?) AND ([Amount Paid at Time of Service] " & _
        "= ? OR ? IS NULL AND [Amount Paid at Time of Service] IS NULL) AND ([Amount of S" & _
        "ervice] = ? OR ? IS NULL AND [Amount of Service] IS NULL) AND (ContractorID = ? " & _
        "OR ? IS NULL AND ContractorID IS NULL) AND ([Date of Service] = ? OR ? IS NULL A" & _
        "ND [Date of Service] IS NULL) AND ([Discount on Service] = ? OR ? IS NULL AND [D" & _
        "iscount on Service] IS NULL) AND ([First Name] = ? OR ? IS NULL AND [First Name]" & _
        " IS NULL) AND ([Last Name] = ? OR ? IS NULL AND [Last Name] IS NULL) AND ([Lytec" & _
        " Number] = ? OR ? IS NULL AND [Lytec Number] IS NULL) AND ([Service Code] = ? OR" & _
        " ? IS NULL AND [Service Code] IS NULL) AND ([Service Description] = ? OR ? IS NU" & _
        "LL AND [Service Description] IS NULL) AND (serviceType = ? OR ? IS NULL AND serv" & _
        "iceType IS NULL)"
        Me.OleDbDeleteCommand2.Connection = Me.OleDbConnection1
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Record_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Record ID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_Paid_at_Time_of_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount Paid at Time of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_Paid_at_Time_of_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount Paid at Time of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_of_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Amount_of_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Amount of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ContractorID", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ContractorID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ContractorID1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ContractorID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Date_of_Service", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Date of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Date_of_Service1", System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Date of Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Discount_on_Service", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Discount on Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Discount_on_Service1", System.Data.OleDb.OleDbType.Currency, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Discount on Service", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_First_Name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "First Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_First_Name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "First Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Last_Name", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Last Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Last_Name1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Last Name", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Lytec_Number", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Lytec Number", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Lytec_Number1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Lytec Number", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Code", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Code", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Code1", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Code", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Description", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Description", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Service_Description1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Service Description", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_serviceType", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "serviceType", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand2.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_serviceType1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "serviceType", System.Data.DataRowVersion.Original, Nothing))
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(752, 349)
        Me.Controls.Add(Me.Button5)
        Me.Controls.Add(Me.Button2)
        Me.Controls.Add(Me.TextBox1)
        Me.Controls.Add(Me.cmbPayCode)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.lblProvider)
        Me.Controls.Add(Me.cmbprovider)
        Me.Controls.Add(Me.Button4)
        Me.Controls.Add(Me.Button3)
        Me.Controls.Add(Me.lblFirstName)
        Me.Controls.Add(Me.txtFirstName)
        Me.Controls.Add(Me.lblLastName)
        Me.Controls.Add(Me.txtLastName)
        Me.Controls.Add(Me.Button1)
        Me.Controls.Add(Me.cmdExit)
        Me.Controls.Add(Me.lblRecord)
        Me.Controls.Add(Me.txtRecord)
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
        CType(Me.Clinic1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.Dataprov11, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.DataSet41, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lblRecord.Click

    End Sub

    Private Sub cmdExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExit.Click
        End
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim frm As New Form2
        frm.Show()


    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataSet41.Clear()
        OleDbDataAdapter2.Fill(DataSet41)
        Clinic1.Clear()
        OleDbDataAdapter1.Fill(Clinic1)
        Dataprov11.Clear()
        OleDbDataAdapter3.Fill(Dataprov11)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
        Clinic1.Clear()
        OleDbDataAdapter1.Fill(Clinic1)

    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.BindingContext(Clinic1, "Clinic").Position += 1

    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click

    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub


    Private Sub MenuItem10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem10.Click
        Dim frmpay As New Form3
        frmpay.Show()

    End Sub

    Private Sub MenuItem4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub cmbPayCodes_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub

    Private Sub OleDbConnection3_InfoMessage(ByVal sender As System.Object, ByVal e As System.Data.OleDb.OleDbInfoMessageEventArgs)

    End Sub

    Private Sub cmbPayCode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPayCode.SelectedIndexChanged

    End Sub

    Private Sub cmbPayCode_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbPayCode.DoubleClick

    End Sub

    Private Sub OleDbDataAdapter1_RowUpdated(ByVal sender As System.Object, ByVal e As System.Data.OleDb.OleDbRowUpdatedEventArgs) Handles OleDbDataAdapter1.RowUpdated

    End Sub

    Private Sub DataGrid1_Navigate(ByVal sender As System.Object, ByVal ne As System.Windows.Forms.NavigateEventArgs)

    End Sub

    Private Sub Button5_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
        DataSet41.Clear()
        OleDbDataAdapter2.Fill(DataSet41)
    End Sub

    Protected Overrides Sub UpdateDefaultButton()

    End Sub

    Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

        Try
            OleDbDataAdapter1.Update(Clinic1)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
        OleDbDataAdapter1.Update(Clinic1)
        OleDbDataAdapter1.Fill(Clinic1)
        OleDbDataAdapter2.Update(DataSet41)
        OleDbDataAdapter2.Fill(DataSet41)
        OleDbDataAdapter3.Update(Dataprov11)
        OleDbDataAdapter3.Fill(Dataprov11)

    End Sub

    Private Sub MenuItem4_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem4.Click
        Dim frmpro As New Form4
        frmpro.Show()
    End Sub

    Private Sub txtFirstName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtFirstName.TextChanged

    End Sub

    Private Sub Button5_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        OleDbDataAdapter1.Update(Clinic1)
        Clinic1.AcceptChanges()
        Try
            OleDbDataAdapter1.Update(Clinic1)
        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
0
 
LVL 27

Expert Comment

by:Dabas
ID: 9829082
mixmates,
Sorry Mate. I will need the Clinic class to be able to view anything

Dabas
0
 

Author Comment

by:mixmates
ID: 9829160
No prob here's the clinic class.

Option Strict Off
Option Explicit On

Imports System
Imports System.Data
Imports System.Runtime.Serialization
Imports System.Xml


<Serializable(),  _
 System.ComponentModel.DesignerCategoryAttribute("code"),  _
 System.Diagnostics.DebuggerStepThrough(),  _
 System.ComponentModel.ToolboxItem(true)>  _
Public Class clinic
    Inherits DataSet
   
    Private tableclinic As clinicDataTable
   
    Private tableprovobj As provobjDataTable
   
    Public Sub New()
        MyBase.New
        Me.InitClass
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
   
    Protected Sub New(ByVal info As SerializationInfo, ByVal context As StreamingContext)
        MyBase.New
        Dim strSchema As String = CType(info.GetValue("XmlSchema", GetType(System.String)),String)
        If (Not (strSchema) Is Nothing) Then
            Dim ds As DataSet = New DataSet
            ds.ReadXmlSchema(New XmlTextReader(New System.IO.StringReader(strSchema)))
            If (Not (ds.Tables("clinic")) Is Nothing) Then
                Me.Tables.Add(New clinicDataTable(ds.Tables("clinic")))
            End If
            If (Not (ds.Tables("provobj")) Is Nothing) Then
                Me.Tables.Add(New provobjDataTable(ds.Tables("provobj")))
            End If
            Me.DataSetName = ds.DataSetName
            Me.Prefix = ds.Prefix
            Me.Namespace = ds.Namespace
            Me.Locale = ds.Locale
            Me.CaseSensitive = ds.CaseSensitive
            Me.EnforceConstraints = ds.EnforceConstraints
            Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
            Me.InitVars
        Else
            Me.InitClass
        End If
        Me.GetSerializationData(info, context)
        Dim schemaChangedHandler As System.ComponentModel.CollectionChangeEventHandler = AddressOf Me.SchemaChanged
        AddHandler Me.Tables.CollectionChanged, schemaChangedHandler
        AddHandler Me.Relations.CollectionChanged, schemaChangedHandler
    End Sub
   
    <System.ComponentModel.Browsable(false),  _
     System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)>  _
    Public ReadOnly Property clinic As clinicDataTable
        Get
            Return Me.tableclinic
        End Get
    End Property
   
    <System.ComponentModel.Browsable(false),  _
     System.ComponentModel.DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Content)>  _
    Public ReadOnly Property provobj As provobjDataTable
        Get
            Return Me.tableprovobj
        End Get
    End Property
   
    Public Overrides Function Clone() As DataSet
        Dim cln As clinic = CType(MyBase.Clone,clinic)
        cln.InitVars
        Return cln
    End Function
   
    Protected Overrides Function ShouldSerializeTables() As Boolean
        Return false
    End Function
   
    Protected Overrides Function ShouldSerializeRelations() As Boolean
        Return false
    End Function
   
    Protected Overrides Sub ReadXmlSerializable(ByVal reader As XmlReader)
        Me.Reset
        Dim ds As DataSet = New DataSet
        ds.ReadXml(reader)
        If (Not (ds.Tables("clinic")) Is Nothing) Then
            Me.Tables.Add(New clinicDataTable(ds.Tables("clinic")))
        End If
        If (Not (ds.Tables("provobj")) Is Nothing) Then
            Me.Tables.Add(New provobjDataTable(ds.Tables("provobj")))
        End If
        Me.DataSetName = ds.DataSetName
        Me.Prefix = ds.Prefix
        Me.Namespace = ds.Namespace
        Me.Locale = ds.Locale
        Me.CaseSensitive = ds.CaseSensitive
        Me.EnforceConstraints = ds.EnforceConstraints
        Me.Merge(ds, false, System.Data.MissingSchemaAction.Add)
        Me.InitVars
    End Sub
   
    Protected Overrides Function GetSchemaSerializable() As System.Xml.Schema.XmlSchema
        Dim stream As System.IO.MemoryStream = New System.IO.MemoryStream
        Me.WriteXmlSchema(New XmlTextWriter(stream, Nothing))
        stream.Position = 0
        Return System.Xml.Schema.XmlSchema.Read(New XmlTextReader(stream), Nothing)
    End Function
   
    Friend Sub InitVars()
        Me.tableclinic = CType(Me.Tables("clinic"),clinicDataTable)
        If (Not (Me.tableclinic) Is Nothing) Then
            Me.tableclinic.InitVars
        End If
        Me.tableprovobj = CType(Me.Tables("provobj"),provobjDataTable)
        If (Not (Me.tableprovobj) Is Nothing) Then
            Me.tableprovobj.InitVars
        End If
    End Sub
   
    Private Sub InitClass()
        Me.DataSetName = "clinic"
        Me.Prefix = ""
        Me.Namespace = "http://www.tempuri.org/clinic.xsd"
        Me.Locale = New System.Globalization.CultureInfo("en-US")
        Me.CaseSensitive = false
        Me.EnforceConstraints = true
        Me.tableclinic = New clinicDataTable
        Me.Tables.Add(Me.tableclinic)
        Me.tableprovobj = New provobjDataTable
        Me.Tables.Add(Me.tableprovobj)
    End Sub
   
    Private Function ShouldSerializeclinic() As Boolean
        Return false
    End Function
   
    Private Function ShouldSerializeprovobj() As Boolean
        Return false
    End Function
   
    Private Sub SchemaChanged(ByVal sender As Object, ByVal e As System.ComponentModel.CollectionChangeEventArgs)
        If (e.Action = System.ComponentModel.CollectionChangeAction.Remove) Then
            Me.InitVars
        End If
    End Sub
   
    Public Delegate Sub clinicRowChangeEventHandler(ByVal sender As Object, ByVal e As clinicRowChangeEvent)
   
    Public Delegate Sub provobjRowChangeEventHandler(ByVal sender As Object, ByVal e As provobjRowChangeEvent)
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class clinicDataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
       
        Private columnAmount_of_Service As DataColumn
       
        Private columnAmount_Paid_at_Time_of_Service As DataColumn
       
        Private columnContractorID As DataColumn
       
        Private columnDate_of_Service As DataColumn
       
        Private columnDiscount_on_Service As DataColumn
       
        Private columnFirst_Name As DataColumn
       
        Private columnLast_Name As DataColumn
       
        Private columnLytec_Number As DataColumn
       
        Private columnRecord_ID As DataColumn
       
        Private columnService_Code As DataColumn
       
        Private columnService_Description As DataColumn
       
        Private columnserviceType As DataColumn
       
        Friend Sub New()
            MyBase.New("clinic")
            Me.InitClass
        End Sub
       
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(table.TableName)
            If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
                Me.CaseSensitive = table.CaseSensitive
            End If
            If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
                Me.Locale = table.Locale
            End If
            If (table.Namespace <> table.DataSet.Namespace) Then
                Me.Namespace = table.Namespace
            End If
            Me.Prefix = table.Prefix
            Me.MinimumCapacity = table.MinimumCapacity
            Me.DisplayExpression = table.DisplayExpression
        End Sub
       
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
       
        Friend ReadOnly Property Amount_of_ServiceColumn As DataColumn
            Get
                Return Me.columnAmount_of_Service
            End Get
        End Property
       
        Friend ReadOnly Property Amount_Paid_at_Time_of_ServiceColumn As DataColumn
            Get
                Return Me.columnAmount_Paid_at_Time_of_Service
            End Get
        End Property
       
        Friend ReadOnly Property ContractorIDColumn As DataColumn
            Get
                Return Me.columnContractorID
            End Get
        End Property
       
        Friend ReadOnly Property Date_of_ServiceColumn As DataColumn
            Get
                Return Me.columnDate_of_Service
            End Get
        End Property
       
        Friend ReadOnly Property Discount_on_ServiceColumn As DataColumn
            Get
                Return Me.columnDiscount_on_Service
            End Get
        End Property
       
        Friend ReadOnly Property First_NameColumn As DataColumn
            Get
                Return Me.columnFirst_Name
            End Get
        End Property
       
        Friend ReadOnly Property Last_NameColumn As DataColumn
            Get
                Return Me.columnLast_Name
            End Get
        End Property
       
        Friend ReadOnly Property Lytec_NumberColumn As DataColumn
            Get
                Return Me.columnLytec_Number
            End Get
        End Property
       
        Friend ReadOnly Property Record_IDColumn As DataColumn
            Get
                Return Me.columnRecord_ID
            End Get
        End Property
       
        Friend ReadOnly Property Service_CodeColumn As DataColumn
            Get
                Return Me.columnService_Code
            End Get
        End Property
       
        Friend ReadOnly Property Service_DescriptionColumn As DataColumn
            Get
                Return Me.columnService_Description
            End Get
        End Property
       
        Friend ReadOnly Property serviceTypeColumn As DataColumn
            Get
                Return Me.columnserviceType
            End Get
        End Property
       
        Public Default ReadOnly Property Item(ByVal index As Integer) As clinicRow
            Get
                Return CType(Me.Rows(index),clinicRow)
            End Get
        End Property
       
        Public Event clinicRowChanged As clinicRowChangeEventHandler
       
        Public Event clinicRowChanging As clinicRowChangeEventHandler
       
        Public Event clinicRowDeleted As clinicRowChangeEventHandler
       
        Public Event clinicRowDeleting As clinicRowChangeEventHandler
       
        Public Overloads Sub AddclinicRow(ByVal row As clinicRow)
            Me.Rows.Add(row)
        End Sub
       
        Public Overloads Function AddclinicRow(ByVal Amount_of_Service As Decimal, ByVal Amount_Paid_at_Time_of_Service As Decimal, ByVal ContractorID As String, ByVal Date_of_Service As Date, ByVal Discount_on_Service As Decimal, ByVal First_Name As String, ByVal Last_Name As String, ByVal Lytec_Number As Integer, ByVal Service_Code As Integer, ByVal Service_Description As String, ByVal serviceType As String) As clinicRow
            Dim rowclinicRow As clinicRow = CType(Me.NewRow,clinicRow)
            rowclinicRow.ItemArray = New Object() {Amount_of_Service, Amount_Paid_at_Time_of_Service, ContractorID, Date_of_Service, Discount_on_Service, First_Name, Last_Name, Lytec_Number, Nothing, Service_Code, Service_Description, serviceType}
            Me.Rows.Add(rowclinicRow)
            Return rowclinicRow
        End Function
       
        Public Function FindByRecord_ID(ByVal Record_ID As Integer) As clinicRow
            Return CType(Me.Rows.Find(New Object() {Record_ID}),clinicRow)
        End Function
       
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
       
        Public Overrides Function Clone() As DataTable
            Dim cln As clinicDataTable = CType(MyBase.Clone,clinicDataTable)
            cln.InitVars
            Return cln
        End Function
       
        Protected Overrides Function CreateInstance() As DataTable
            Return New clinicDataTable
        End Function
       
        Friend Sub InitVars()
            Me.columnAmount_of_Service = Me.Columns("Amount of Service")
            Me.columnAmount_Paid_at_Time_of_Service = Me.Columns("Amount Paid at Time of Service")
            Me.columnContractorID = Me.Columns("ContractorID")
            Me.columnDate_of_Service = Me.Columns("Date of Service")
            Me.columnDiscount_on_Service = Me.Columns("Discount on Service")
            Me.columnFirst_Name = Me.Columns("First Name")
            Me.columnLast_Name = Me.Columns("Last Name")
            Me.columnLytec_Number = Me.Columns("Lytec Number")
            Me.columnRecord_ID = Me.Columns("Record ID")
            Me.columnService_Code = Me.Columns("Service Code")
            Me.columnService_Description = Me.Columns("Service Description")
            Me.columnserviceType = Me.Columns("serviceType")
        End Sub
       
        Private Sub InitClass()
            Me.columnAmount_of_Service = New DataColumn("Amount of Service", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnAmount_of_Service)
            Me.columnAmount_Paid_at_Time_of_Service = New DataColumn("Amount Paid at Time of Service", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnAmount_Paid_at_Time_of_Service)
            Me.columnContractorID = New DataColumn("ContractorID", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnContractorID)
            Me.columnDate_of_Service = New DataColumn("Date of Service", GetType(System.DateTime), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnDate_of_Service)
            Me.columnDiscount_on_Service = New DataColumn("Discount on Service", GetType(System.Decimal), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnDiscount_on_Service)
            Me.columnFirst_Name = New DataColumn("First Name", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnFirst_Name)
            Me.columnLast_Name = New DataColumn("Last Name", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnLast_Name)
            Me.columnLytec_Number = New DataColumn("Lytec Number", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnLytec_Number)
            Me.columnRecord_ID = New DataColumn("Record ID", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnRecord_ID)
            Me.columnService_Code = New DataColumn("Service Code", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnService_Code)
            Me.columnService_Description = New DataColumn("Service Description", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnService_Description)
            Me.columnserviceType = New DataColumn("serviceType", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnserviceType)
            Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.columnRecord_ID}, true))
            Me.columnRecord_ID.AutoIncrement = true
            Me.columnRecord_ID.AllowDBNull = false
            Me.columnRecord_ID.Unique = true
        End Sub
       
        Public Function NewclinicRow() As clinicRow
            Return CType(Me.NewRow,clinicRow)
        End Function
       
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New clinicRow(builder)
        End Function
       
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(clinicRow)
        End Function
       
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.clinicRowChangedEvent) Is Nothing) Then
                RaiseEvent clinicRowChanged(Me, New clinicRowChangeEvent(CType(e.Row,clinicRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.clinicRowChangingEvent) Is Nothing) Then
                RaiseEvent clinicRowChanging(Me, New clinicRowChangeEvent(CType(e.Row,clinicRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.clinicRowDeletedEvent) Is Nothing) Then
                RaiseEvent clinicRowDeleted(Me, New clinicRowChangeEvent(CType(e.Row,clinicRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.clinicRowDeletingEvent) Is Nothing) Then
                RaiseEvent clinicRowDeleting(Me, New clinicRowChangeEvent(CType(e.Row,clinicRow), e.Action))
            End If
        End Sub
       
        Public Sub RemoveclinicRow(ByVal row As clinicRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class clinicRow
        Inherits DataRow
       
        Private tableclinic As clinicDataTable
       
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableclinic = CType(Me.Table,clinicDataTable)
        End Sub
       
        Public Property Amount_of_Service As Decimal
            Get
                Try
                    Return CType(Me(Me.tableclinic.Amount_of_ServiceColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Amount_of_ServiceColumn) = value
            End Set
        End Property
       
        Public Property Amount_Paid_at_Time_of_Service As Decimal
            Get
                Try
                    Return CType(Me(Me.tableclinic.Amount_Paid_at_Time_of_ServiceColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Amount_Paid_at_Time_of_ServiceColumn) = value
            End Set
        End Property
       
        Public Property ContractorID As String
            Get
                Try
                    Return CType(Me(Me.tableclinic.ContractorIDColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.ContractorIDColumn) = value
            End Set
        End Property
       
        Public Property Date_of_Service As Date
            Get
                Try
                    Return CType(Me(Me.tableclinic.Date_of_ServiceColumn),Date)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Date_of_ServiceColumn) = value
            End Set
        End Property
       
        Public Property Discount_on_Service As Decimal
            Get
                Try
                    Return CType(Me(Me.tableclinic.Discount_on_ServiceColumn),Decimal)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Discount_on_ServiceColumn) = value
            End Set
        End Property
       
        Public Property First_Name As String
            Get
                Try
                    Return CType(Me(Me.tableclinic.First_NameColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.First_NameColumn) = value
            End Set
        End Property
       
        Public Property Last_Name As String
            Get
                Try
                    Return CType(Me(Me.tableclinic.Last_NameColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Last_NameColumn) = value
            End Set
        End Property
       
        Public Property Lytec_Number As Integer
            Get
                Try
                    Return CType(Me(Me.tableclinic.Lytec_NumberColumn),Integer)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Lytec_NumberColumn) = value
            End Set
        End Property
       
        Public Property Record_ID As Integer
            Get
                Return CType(Me(Me.tableclinic.Record_IDColumn),Integer)
            End Get
            Set
                Me(Me.tableclinic.Record_IDColumn) = value
            End Set
        End Property
       
        Public Property Service_Code As Integer
            Get
                Try
                    Return CType(Me(Me.tableclinic.Service_CodeColumn),Integer)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Service_CodeColumn) = value
            End Set
        End Property
       
        Public Property Service_Description As String
            Get
                Try
                    Return CType(Me(Me.tableclinic.Service_DescriptionColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.Service_DescriptionColumn) = value
            End Set
        End Property
       
        Public Property serviceType As String
            Get
                Try
                    Return CType(Me(Me.tableclinic.serviceTypeColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableclinic.serviceTypeColumn) = value
            End Set
        End Property
       
        Public Function IsAmount_of_ServiceNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Amount_of_ServiceColumn)
        End Function
       
        Public Sub SetAmount_of_ServiceNull()
            Me(Me.tableclinic.Amount_of_ServiceColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsAmount_Paid_at_Time_of_ServiceNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Amount_Paid_at_Time_of_ServiceColumn)
        End Function
       
        Public Sub SetAmount_Paid_at_Time_of_ServiceNull()
            Me(Me.tableclinic.Amount_Paid_at_Time_of_ServiceColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsContractorIDNull() As Boolean
            Return Me.IsNull(Me.tableclinic.ContractorIDColumn)
        End Function
       
        Public Sub SetContractorIDNull()
            Me(Me.tableclinic.ContractorIDColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsDate_of_ServiceNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Date_of_ServiceColumn)
        End Function
       
        Public Sub SetDate_of_ServiceNull()
            Me(Me.tableclinic.Date_of_ServiceColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsDiscount_on_ServiceNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Discount_on_ServiceColumn)
        End Function
       
        Public Sub SetDiscount_on_ServiceNull()
            Me(Me.tableclinic.Discount_on_ServiceColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsFirst_NameNull() As Boolean
            Return Me.IsNull(Me.tableclinic.First_NameColumn)
        End Function
       
        Public Sub SetFirst_NameNull()
            Me(Me.tableclinic.First_NameColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsLast_NameNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Last_NameColumn)
        End Function
       
        Public Sub SetLast_NameNull()
            Me(Me.tableclinic.Last_NameColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsLytec_NumberNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Lytec_NumberColumn)
        End Function
       
        Public Sub SetLytec_NumberNull()
            Me(Me.tableclinic.Lytec_NumberColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsService_CodeNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Service_CodeColumn)
        End Function
       
        Public Sub SetService_CodeNull()
            Me(Me.tableclinic.Service_CodeColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsService_DescriptionNull() As Boolean
            Return Me.IsNull(Me.tableclinic.Service_DescriptionColumn)
        End Function
       
        Public Sub SetService_DescriptionNull()
            Me(Me.tableclinic.Service_DescriptionColumn) = System.Convert.DBNull
        End Sub
       
        Public Function IsserviceTypeNull() As Boolean
            Return Me.IsNull(Me.tableclinic.serviceTypeColumn)
        End Function
       
        Public Sub SetserviceTypeNull()
            Me(Me.tableclinic.serviceTypeColumn) = System.Convert.DBNull
        End Sub
    End Class
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class clinicRowChangeEvent
        Inherits EventArgs
       
        Private eventRow As clinicRow
       
        Private eventAction As DataRowAction
       
        Public Sub New(ByVal row As clinicRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
       
        Public ReadOnly Property Row As clinicRow
            Get
                Return Me.eventRow
            End Get
        End Property
       
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class provobjDataTable
        Inherits DataTable
        Implements System.Collections.IEnumerable
       
        Private columnID As DataColumn
       
        Private columnProvider As DataColumn
       
        Friend Sub New()
            MyBase.New("provobj")
            Me.InitClass
        End Sub
       
        Friend Sub New(ByVal table As DataTable)
            MyBase.New(table.TableName)
            If (table.CaseSensitive <> table.DataSet.CaseSensitive) Then
                Me.CaseSensitive = table.CaseSensitive
            End If
            If (table.Locale.ToString <> table.DataSet.Locale.ToString) Then
                Me.Locale = table.Locale
            End If
            If (table.Namespace <> table.DataSet.Namespace) Then
                Me.Namespace = table.Namespace
            End If
            Me.Prefix = table.Prefix
            Me.MinimumCapacity = table.MinimumCapacity
            Me.DisplayExpression = table.DisplayExpression
        End Sub
       
        <System.ComponentModel.Browsable(false)>  _
        Public ReadOnly Property Count As Integer
            Get
                Return Me.Rows.Count
            End Get
        End Property
       
        Friend ReadOnly Property IDColumn As DataColumn
            Get
                Return Me.columnID
            End Get
        End Property
       
        Friend ReadOnly Property ProviderColumn As DataColumn
            Get
                Return Me.columnProvider
            End Get
        End Property
       
        Public Default ReadOnly Property Item(ByVal index As Integer) As provobjRow
            Get
                Return CType(Me.Rows(index),provobjRow)
            End Get
        End Property
       
        Public Event provobjRowChanged As provobjRowChangeEventHandler
       
        Public Event provobjRowChanging As provobjRowChangeEventHandler
       
        Public Event provobjRowDeleted As provobjRowChangeEventHandler
       
        Public Event provobjRowDeleting As provobjRowChangeEventHandler
       
        Public Overloads Sub AddprovobjRow(ByVal row As provobjRow)
            Me.Rows.Add(row)
        End Sub
       
        Public Overloads Function AddprovobjRow(ByVal Provider As String) As provobjRow
            Dim rowprovobjRow As provobjRow = CType(Me.NewRow,provobjRow)
            rowprovobjRow.ItemArray = New Object() {Nothing, Provider}
            Me.Rows.Add(rowprovobjRow)
            Return rowprovobjRow
        End Function
       
        Public Function FindByID(ByVal ID As Integer) As provobjRow
            Return CType(Me.Rows.Find(New Object() {ID}),provobjRow)
        End Function
       
        Public Function GetEnumerator() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
            Return Me.Rows.GetEnumerator
        End Function
       
        Public Overrides Function Clone() As DataTable
            Dim cln As provobjDataTable = CType(MyBase.Clone,provobjDataTable)
            cln.InitVars
            Return cln
        End Function
       
        Protected Overrides Function CreateInstance() As DataTable
            Return New provobjDataTable
        End Function
       
        Friend Sub InitVars()
            Me.columnID = Me.Columns("ID")
            Me.columnProvider = Me.Columns("Provider")
        End Sub
       
        Private Sub InitClass()
            Me.columnID = New DataColumn("ID", GetType(System.Int32), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnID)
            Me.columnProvider = New DataColumn("Provider", GetType(System.String), Nothing, System.Data.MappingType.Element)
            Me.Columns.Add(Me.columnProvider)
            Me.Constraints.Add(New UniqueConstraint("Constraint1", New DataColumn() {Me.columnID}, true))
            Me.columnID.AutoIncrement = true
            Me.columnID.AllowDBNull = false
            Me.columnID.Unique = true
        End Sub
       
        Public Function NewprovobjRow() As provobjRow
            Return CType(Me.NewRow,provobjRow)
        End Function
       
        Protected Overrides Function NewRowFromBuilder(ByVal builder As DataRowBuilder) As DataRow
            Return New provobjRow(builder)
        End Function
       
        Protected Overrides Function GetRowType() As System.Type
            Return GetType(provobjRow)
        End Function
       
        Protected Overrides Sub OnRowChanged(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanged(e)
            If (Not (Me.provobjRowChangedEvent) Is Nothing) Then
                RaiseEvent provobjRowChanged(Me, New provobjRowChangeEvent(CType(e.Row,provobjRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowChanging(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowChanging(e)
            If (Not (Me.provobjRowChangingEvent) Is Nothing) Then
                RaiseEvent provobjRowChanging(Me, New provobjRowChangeEvent(CType(e.Row,provobjRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowDeleted(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleted(e)
            If (Not (Me.provobjRowDeletedEvent) Is Nothing) Then
                RaiseEvent provobjRowDeleted(Me, New provobjRowChangeEvent(CType(e.Row,provobjRow), e.Action))
            End If
        End Sub
       
        Protected Overrides Sub OnRowDeleting(ByVal e As DataRowChangeEventArgs)
            MyBase.OnRowDeleting(e)
            If (Not (Me.provobjRowDeletingEvent) Is Nothing) Then
                RaiseEvent provobjRowDeleting(Me, New provobjRowChangeEvent(CType(e.Row,provobjRow), e.Action))
            End If
        End Sub
       
        Public Sub RemoveprovobjRow(ByVal row As provobjRow)
            Me.Rows.Remove(row)
        End Sub
    End Class
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class provobjRow
        Inherits DataRow
       
        Private tableprovobj As provobjDataTable
       
        Friend Sub New(ByVal rb As DataRowBuilder)
            MyBase.New(rb)
            Me.tableprovobj = CType(Me.Table,provobjDataTable)
        End Sub
       
        Public Property ID As Integer
            Get
                Return CType(Me(Me.tableprovobj.IDColumn),Integer)
            End Get
            Set
                Me(Me.tableprovobj.IDColumn) = value
            End Set
        End Property
       
        Public Property Provider As String
            Get
                Try
                    Return CType(Me(Me.tableprovobj.ProviderColumn),String)
                Catch e As InvalidCastException
                    Throw New StrongTypingException("Cannot get value because it is DBNull.", e)
                End Try
            End Get
            Set
                Me(Me.tableprovobj.ProviderColumn) = value
            End Set
        End Property
       
        Public Function IsProviderNull() As Boolean
            Return Me.IsNull(Me.tableprovobj.ProviderColumn)
        End Function
       
        Public Sub SetProviderNull()
            Me(Me.tableprovobj.ProviderColumn) = System.Convert.DBNull
        End Sub
    End Class
   
    <System.Diagnostics.DebuggerStepThrough()>  _
    Public Class provobjRowChangeEvent
        Inherits EventArgs
       
        Private eventRow As provobjRow
       
        Private eventAction As DataRowAction
       
        Public Sub New(ByVal row As provobjRow, ByVal action As DataRowAction)
            MyBase.New
            Me.eventRow = row
            Me.eventAction = action
        End Sub
       
        Public ReadOnly Property Row As provobjRow
            Get
                Return Me.eventRow
            End Get
        End Property
       
        Public ReadOnly Property Action As DataRowAction
            Get
                Return Me.eventAction
            End Get
        End Property
    End Class
End Class
0
 
LVL 27

Expert Comment

by:Dabas
ID: 9829242
mixmates,
Puffffff! Managed to get something going.
What exactly do you want to happen when somebody clicks the Add button?

Dabas
0
 

Author Comment

by:mixmates
ID: 9829263
Sorry I had just drawn that not added (the working code anyway) I had tried something but don't have it now as you can see I have been throwing samples in and trying them. I was really wanting to add a new blank record that was ready for input but I got hung up on the update portion of the record. I could manage this stuff in vb 4 and 5 but it has changed greatly.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 27

Expert Comment

by:Dabas
ID: 9829349
mixmates,
OK. Seems you are following in my footsteps.
I also have migrated from VB to .NET and have had similar stumble blocks.

You can see my question at the time here:

http://experts-exchange.com/Programming/Programming_Languages/Dot_Net/Q_20572351.html

I think today I could supply a better answer myself than what I got, but it did get me going in the right direction.

Have a look at that first, then lets simplify your problem as much as possible and I will try to guide you through the ADO.NET maze!

Dabas
0
 

Author Comment

by:mixmates
ID: 9829486
I somewhat understand but let me add and define the picture here. Forgetting all the other stuff in basics I placed these textboxes (rather haphazardly) I created the database then placed the oledbdataadapter with the jet 4. engine with the Select and From statements where generated in it. I generated the dataset from this object. I then went back to the properties of the text and combo boxes and connected them to their respective fields(The only thing so far that had been familiar about vb and databases). Now I can bring up the program and view the records. Pause* Had to go outside and scream. Cr@# ok figured out the add feel stupid but can't find a corresponding delete. Here's the code I used to add a record:

Me.BindingContext(Clinic1, "Clinic").AddNew()

I need the text entered into the textboxes and comboboxes to be entered into the corresponding fields of the database. The other textboxes I have yet to enter will be used for pulling percentages. I can't use the datagrid control for this because of the specific purpose of the program and the interface my father needs.
0
 
LVL 27

Expert Comment

by:Dabas
ID: 9829537
mixmates,
I never liked binding in VB, and I have been able to easily live without it in .NET
I know other experts will disagree with me, but it is so easy to write code that does EXACTLY what you want and not what M$oft thinks you want.

Here is how I solve this type of situation:
Text boxes: Use the Tag property to hold the field name.
Comboboxes: Fill through code with the whole datarow.
In .NET, the items of the combobox are objects, not just strings
What gets displayed is the object.ToString value
My suggestion: Add an Overrides Function ToString() as String function to the Clinic class
Fill the combo with clinic objects!

OK, up to here?

Dabas
0
 

Author Comment

by:mixmates
ID: 9829659
I changed it to tag and added an override function tostring() as string function in the clinic class but no change other than they would no longer display the record
0
 
LVL 27

Accepted Solution

by:
Dabas earned 500 total points
ID: 9829706
mixmates,
Your project is too complex for me to go into it and test it myself.
This is the way I would guess you would fill your combobox:

            For Each dr As DataRow In Clinic1.clinic.Rows
                  cmbPayCode.Items.Add(dr)
            Next

Dabas
0
 

Author Comment

by:mixmates
ID: 9834422
Well it was a tall order Thanks for the help
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
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.

746 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

11 Experts available now in Live!

Get 1:1 Help Now