Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This needs to be done in Visual Basic Example 5 two tables from the Megacities database: Megacities The following program displays Table 10.3, the join

This needs to be done in Visual Basic
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Example 5 two tables from the Megacities database: Megacities The following program displays Table 10.3, the join of the Private Sub frmcities Load(...) Handles MyBase. Load Me.CountriesTableAdapter.Fill (Me. MegacitiesDataset.Countries) Me.CitiesTableAdapter Fil1 (Me.MegacitiesDataset.cities) End Sub Private Sub btnDisplay_Click(...) Handles btnDisplay.click Dim query = Fron city In MegacitiesDataSet.cities Join country In MegacitiesDataSet.Countries On city.country Equals country name Let cityName city, name Let cityPop2014 = (city . pop2014),ToString ("N1") Let cityPop2030 (city . pop2030),ToString ("N1" ) Let countryName = country. name Let countryPop2014 = (country.pop2014).ToString ("NI") Select cityName, city.country, cityPop2014, cityPop2030, countryName, countryPop2014, country.monetaryUnit dgvOutput.DataSource = query .ToList dgvoutput.Currentcell - Nothing End Sub [Run, and click on the button.] Display the Join of Two Tables 17.0 19.1 36.1 Argentine 41.8 Buenos Aires Argentine 15.0 1,236.3 1,236.3 14.8 Indin India Bangladesh 17.0 274 Bangladesh 166.3 rupee 25.0 Delhi Dhaka peso 23.9 27.8 19.9 23.4 30.8 37.2 119.7 1,236.3 318.9 202.7 1,355.7 127.1 Mexico City Mexico 20.8 India 20.7 18.6 20.8 23.0 Japen 37.8 India doller New York Sao Paulo Brazil Shanghai China Tokyo Brazil Japan

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions