.

Thursday, May 16, 2019

Software Architecture Code for Wrapper Class

Wrapper to assign two applications with different architectures Public con As ADODB. Connection Public rs As ADODB. Recordset Dim str As String secret gun Command1_Click() Command1. Enabled = False Command2. Enabled = False Command3. Enabled = False Command4. Enabled = True Set con = advanced ADODB. Connection Set rs = New ADODB. Recordset con. Open Provider=SQLOLEDB. 1Integrated gage=SSPIPersist Security Info=FalseInitial Catalog= strip str = insert into mental faculty values( & text1. text edition & , & text2.Text & , & Text3. Text & , & Text4. Text & , & Text5. Text & ) On Error GoTo Delete_Error con. Execute (str) MsgBox Record added Successfully Text1. Text = Text2. Text = Text3. Text = Text4. Text = Text5. Text = Text1. SetFocus Exit Sub Delete_Error MsgBox This record cannot be Added. Error code = _ & Err. Number & vbCrLf & Err. Description, _ vbCritical, Cannot Update Database can Sub esoteric Sub Command2_Click() Command1. Enabled = False Command4. Enabled = False Command6.Enabled = False If (Adodc1. Recordset. BOF) Then Adodc1. Recordset. MoveLast Else Adodc1. Recordset. MovePrevious End If End Sub Private Sub Command3_Click() Command1. Enabled = False Command4. Enabled = False Command6. Enabled = False If (Adodc1. Recordset. EOF) Then Adodc1. Recordset. MoveFirst Else Adodc1. Recordset. MoveNext End If End Sub Private Sub Command4_Click() Command4. Enabled = False Command1. Enabled = True Command2. Enabled = False Command3. Enabled = False Command7. Enabled = False Text1. Text = Text2. Text = Text3. Text = Text4. Text = Text5. Text = Text1. SetFocus End Sub Private Sub Command5_Click() Unload Me Form2. Show End Sub Private Sub Command6_Click() Text1. Text = Text2. Text = Text3. Text = Text4. Text = Text5. Text = Text1. SetFocus End Sub SQL COMMANDS create database AIR create table Staff(Staff_id int PRIMARY KEY NOT NULL,Staff_name varchar(20), Staff_age int, Salary int, Staff_address varchar(30)) Database AIR created success fully Table Staff creates successfully

No comments:

Post a Comment