Preview

Software Architecture Code for Wrapper Class

Satisfactory Essays
Open Document
Open Document
270 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Software Architecture Code for Wrapper Class
Wrapper to connect two applications with different architectures

Public con As ADODB.Connection
Public rs As ADODB.Recordset
Dim str As String

Private Sub Command1_Click()

Command1.Enabled = False
Command2.Enabled = False
Command3.Enabled = False
Command4.Enabled = True

Set con = New ADODB.Connection
Set rs = New ADODB.Recordset con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=AIR" str = "insert into Staff values(" & Text1.Text & ",'" & 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"
End Sub

Private 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

You May Also Find These Documents Helpful

  • Satisfactory Essays

    Use SQL*Loader For dept table: Control File: load data infile 'dept.dat ' "var 3" into table dept fields terminated by ', ' optionally enclosed by '" ' (col1 NUMBER(2), col2 VARCHAR2(30), col3 VARCHAR2(20) ) From Command Prompt: SQLLDR CONTROL= dept.ctl, LOG=bar.log, BAD=baz.bad, DATA= dept.dat USERID=student/student, ERRORS=999, LOAD=2000, DISCARD= toss.dis, DISCARDMAX=5…

    • 1169 Words
    • 5 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Newport News County has a T-Ball league in Hampton, VA situated in the Mallory community. . This is a part of a large community of the local T-Ball and youth league programs offered in the area. The league is for young children between the ages of four and seven. The league is for building character, teaching team work and development. Each T-ball team consists of 12-14 kids from all the surrounding cities. The league allows for parents to come in and volunteer as a means to save cost. Though all cities don't have a team, those that have teams are named after current MLB team names.…

    • 545 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Unit 6 Exercise 1

    • 122 Words
    • 1 Page

    Once every employee has been entered in the spreadsheet, copy the command and paste it in the command prompt. You should receive a user created successfully message displayed on the command prompt. If you run into any problems or have any questions don’t hesitate to send me an email.…

    • 122 Words
    • 1 Page
    Satisfactory Essays
  • Good Essays

    On the Staffing Plan worksheet, in cells A9:A18, set a Data Validation rule that allows values from a list to be entered in this cell. Set the source to =Job_Code. From the newly created Data Validation list in cell A9, select M-MG.…

    • 566 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    FirstName) EmployeeName, concat(EmployeeTitles. Title,' - ',Employees. Level) Title, concat(Employees. Salary ,'(USD)')…

    • 485 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Programing Problems

    • 721 Words
    • 3 Pages

    Main Module Declare EmployeeID As Real Declare HourlyRate As Real Declare RegHours As Real Declare OvertimeHours As Real Declare GrossPay As Real Declare Tax…

    • 721 Words
    • 3 Pages
    Good Essays
  • Better Essays

    A word-processed template is currently used for Sam and Sonia's invoices, they use the template to list school address details and prices of products. They also use a calculator to calculate the costs. Quotes and invoices are produced by these manual methods but calculation errors occasionally occur. They are searching for a more efficient process as their product range and their sales increase. They have been advised that they have to use a spreadsheet, yet they don't have a whole lot of understanding in operating this program.…

    • 2504 Words
    • 8 Pages
    Better Essays
  • Satisfactory Essays

    All of these problems may result of wrong requirements gathering, of course it will be a result of serious errors in requirements.…

    • 475 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Pt1420 Final Exam

    • 527 Words
    • 3 Pages

    | Formulate an SQL statement to insert a new record into the PirmariiTb table with the values 'Heemstede', ‘Gerda Otto', '0760072008' and 'Sasolburg'. Display all the records and fields in the PirmariiTb table after the new record has been added.…

    • 527 Words
    • 3 Pages
    Good Essays
  • Good Essays

    | |computers (PCs), were birthed in attempts to simplify or progress the functions of the|…

    • 857 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Craft-Oriented Objects

    • 252 Words
    • 2 Pages

    We encounter many craft- oriented objects day to day. I do not think I really thought about how objects were made and their value in life until I received this assignment. As I was thinking about all of the things that are craft- oriented, I especially thought about things at work and my home.…

    • 252 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    In this article, by Jere Longman, a sportswriter for the New York Times, Sydney Leroux, A SUBSTITUTE FORWARD FOR THE UNITED STATES WOMEN’S SOCCER TEAM, SHE HAS A BRIGHT FUTURE BUT ALSO, A COMPLICATED PAST, is discussed. Leroux is facing a bit of difficulty in that she was born in Canada, but she chose to play soccer in America. Although she is a talented player, people from her own country see her as a traitor because she did not play for the Canadian team. LEROUX DOESN’T SEEM TO MIND THE CRITICISM TOO MUCH THOUGH, “IT DOESN’T MATTER TO ME. [THE AMERICAN] TEAM IS GOING TO THE OLYMPICS.” Despite the fact that Leroux’s father is American, her nationality is still Canadian as she was born and raised there…

    • 344 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    a written design analysis

    • 850 Words
    • 3 Pages

    Alexander Wang is one of the most buzzed about designers out there, especially as a young visionary who took the reins of the Balenciaga label as creative director at the ripe age of 28. Wang presented the new spring/summer 2014 ready-to-wear collection at the Observatoire de Paris, a lofty space that has apparently never been used for a fashion show before. Wang knows the value in being first, and that appreciation informed the materials he developed. Alexander Wang's second offering for Balenciaga was a pretty pastel dream, with woven sugared almond pink and blue skirt suits opening the show, and structured lace-trimmed mini dresses continuing the ultra-feminine theme. Sharp, monochrome blazers with sheer tulle sleeves added a touch of the designer's signature sports luxe vibe, with white laser cut leather skirts and T-shaped dresses creating a fresh springtime mood.…

    • 850 Words
    • 3 Pages
    Good Essays
  • Good Essays

    The Reliable Pharmaceutical Service, suffering from the declined in revenue and profit. Several reasons for the decline included the following:…

    • 605 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Honda Mission & Vision

    • 630 Words
    • 3 Pages

    …………………………………………………… Private Sub CmdTest_Click ( ) If Me.txtValue1 > Me.txtValue2 Then MsgBox “The Value1 > Value2 “ End Sub ……………………………… ……………………………………………….. Source Code: Option Explicit ……………………………………………………………………………….. Private Sub Form_Load( ) Me.…

    • 630 Words
    • 3 Pages
    Satisfactory Essays

Related Topics