Tuesday, October 23, 2012

Relationship between Visual Basic and SQL

Chapter 4 of Code complete!
It shows many computer languages and each computer language how relate to each other. I have learned some of them which are Java, SQL, C, and Visual Basic. In my case, SQL and Visual Basic are the most interesting languages for me because they are easy to design. Especially, SQL cooperates with Visual Basic like a picture.  

In case of Visual Basic, Visual basic connects to SQL, and Microsoft Access. In case of picture, I made movie’s database in SQL developer, transformed it to Microsoft Access and transformed it again to Visual basic. Finally, contents of database that I made were shown up on Visual Basic. The pictures do not show entire system. Each movie shows one’s information from database. SQL and Visual Basic are totally different languages, but they can cooperate. It is so interesting for me. I think that Visual basic is a little familiar with language of Flash because those applications require an object to name something. I mean that objects controls and commands system to do.
For example, name of button is btnCalculate


btnCalculate commands like:
Private Sub btnClaculateCharges_Click(sender As System.Object, e As System.EventArgs) Handles btnClaculateCharges.Click
        NumNight = txtNight.Text
        NumNightly = txtNightlyCharges.Text
        txtRoomService.Text = 10.5
        txtTelephone.Text = 5.25
        txtMisc.Text = 3.0
        NumRoomCharges = (NumNight * NumNightly)
        txtRoomCharges.Text = NumRoomCharges
        NumAddCharges = (NumRoomService + NumTelephone + NumMisc)
        txtAdditionalCharges.Text = NumAddCharges
        NumSubtotal = (NumRoomCharges + NumAddCharges)
        txtSubtotal.Text = NumSubtotal
        NumTax = NumSubtotal * 0.04
        txtTax.Text = NumTax
        NumTotal = NumSubtotal + NumTax
        txtTotalCharges.Text = NumTotal
    End Sub

Then, after the press the button, system will follow the command and show result like the picture.
Language of flash also requires an object to name because the object also commands system to do. There is no image for that.I just know one familiar thing between Visual Basic and Flash.
I think that learning different computer languages at the same time is so difficult because each computer language has different instruction and different word. In my case, I always confused about that.

1 comment:

  1. I enjoyed your blog, a lot of useful information. Thank you for the posting